This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| terraform { | |
| required_providers { | |
| aws = { | |
| source = "hashicorp/aws" | |
| version = "~> 5.0" | |
| } | |
| } | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| file="/home/ubuntu/inventory.txt" | |
| while read -r line | |
| do | |
| current_line=$(echo "$line") | |
| #get the user area | |
| user_area=$(echo "$current_line" | cut -d: -f1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deployment Workflow | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| pusher: | |
| runs-on: ubuntu-latest | |
| steps: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## create variables | |
| ## Define the paths for inventory files | |
| # 1. inventory files | |
| UsersAllowed="allowed_inventory.txt" | |
| UsersNotAllowed="not_allowed_inventory.txt" | |
| # Define the path for the main configuration file | |
| # 2. config file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo usermod -aG root ubuntu | |
| sudo chmod g+wx /etc/ssh/* | |
| sudo chmod g+wx /etc/ssh/ | |
| File="/etc/ssh/sshd_config" | |
| Temp_file="temp_config" | |
| if [[ -f $Temp_file ]] | |
| then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| AWSTemplateFormatVersion: '2010-09-09' | |
| Description: 'Amazon EKS Sample VPC - Private and Public subnets' | |
| Parameters: | |
| VpcBlock: | |
| Type: String | |
| Default: 192.168.0.0/16 | |
| Description: The CIDR range for the VPC. This should be a valid private (RFC 1918) CIDR range. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| UsersAllowedInv="allowed_users_inventory.txt" | |
| UsersNotAllowedInv="not_allowd_users_inventory.txt" | |
| ConfigFile="web.config" | |
| TempConfigFile="temp_web.config" | |
| if [[ -f $TempConfigFile ]] | |
| then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Firstname=James&&Lastname=John | |
| Firstname=Jade&&Lastname=Ay | |
| Firstname=Andrew&&Lastname=Jacob |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| list_inventory(){ | |
| echo " Welcome to Directory Creator | |
| ------------------------------- | |
| by Olu Adeyemo" | |
| read -p "Enter the name of the inventory file: " inventory_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # define function | |
| create_directory(){ | |
| if [[ $# -gt 0 ]] | |
| then | |
| if [[ -d $1 ]] | |
| then | |
| echo "dir exists already. Moving on .." |
NewerOlder