Skip to content

Setting Up Ansible Environment and Hosts #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f1f2f95
add web-dev, db-dev, volumes and networks
Shafiya-Heena Jun 10, 2024
3a20c25
structured the directory names
Shafiya-Heena Jun 10, 2024
a1f058e
contains web-dockerfile and config files
Shafiya-Heena Jun 10, 2024
07e0932
wordpress setup scripts along with config files
Shafiya-Heena Jun 10, 2024
a444808
remove setup and staff scripts temporarly
Shafiya-Heena Jun 11, 2024
816dda9
remove .env and .gitignore
Shafiya-Heena Jun 11, 2024
eb562bc
update docker-compose
Shafiya-Heena Jun 11, 2024
55a8f08
add .env.example and .gitignore as it is needed for docker-compose
Shafiya-Heena Jun 11, 2024
2405ac6
making the environment more generic and removing the index related files
Shafiya-Heena Jun 11, 2024
c5055ea
update Dockerfile
Shafiya-Heena Jun 11, 2024
29a81d7
replacing index with dev
Shafiya-Heena Jun 11, 2024
e0b78f6
replacing index with dev
Shafiya-Heena Jun 11, 2024
c42e6eb
update Dockerfile
Shafiya-Heena Jun 11, 2024
75fba7e
update to add ssh for ansible
Shafiya-Heena Jun 12, 2024
f2db65c
update for ssh in web
Shafiya-Heena Jun 12, 2024
56ebddb
add sysadmin-ssh-keys dir to store keys generated by script
Shafiya-Heena Jun 12, 2024
83d17bc
updated to remove authorized_keys file
Shafiya-Heena Jun 12, 2024
ac06af8
update generate script
Shafiya-Heena Jun 13, 2024
22a6b11
remove version
Shafiya-Heena Jun 13, 2024
d271002
updated to use interpolation in docker-compose
Shafiya-Heena Jun 13, 2024
092b880
update README
Shafiya-Heena Jun 13, 2024
cd5a29e
update readme
Shafiya-Heena Jun 13, 2024
f861973
update README
Shafiya-Heena Jun 13, 2024
e4482dc
adjust the spacing
Shafiya-Heena Jun 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add sysadmin-ssh-keys dir to store keys generated by script
  • Loading branch information
Shafiya-Heena committed Jun 12, 2024
commit 56ebddb3fbb9d1db67f6be1aaca2b052d200725c
17 changes: 17 additions & 0 deletions generate_ssh_keys.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# Define key parameters
KEY_PATH="./sysadmin-ssh-keys"
KEY_FILENAME="rsa_sysadmin"

# Create a directory to store the SSH keys if it doesn't exist
mkdir -p ${KEY_PATH}

# Generate SSH key pair only if they don't already exist
if [ ! -f ${KEY_PATH}/${KEY_FILENAME} ]; then
ssh-keygen -b 4096 -t rsa -C "sysadmin" -f ${KEY_PATH}/${KEY_FILENAME} -N ''
echo "SSH keys generated and stored in ${KEY_PATH}/${KEY_FILENAME}"
else
echo "SSH keys already exist in ${KEY_PATH}/${KEY_FILENAME}"
fi

2 changes: 2 additions & 0 deletions sysadmin-ssh-keys/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This directory contains the SSH keys used for the sysadmin user.

1 change: 1 addition & 0 deletions sysadmin-ssh-keys/authorized_keys
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC2Ri7cUhXlmB+EQzKX+Vd8HGa785CscwMk9a653qHp2B7WUkKiqXjfSwV1Kb5zO08xe1xO8W5zxaQXSv4Lr62Nwm9MbJlZHmm8La8oWfo/f0Xm7q6Z3JvgWfvcX2hG7PCPPeVLB37YRnf90smHzk6PUhIZZ26UBKQQoeqkn3VH5InDMeMQFfv2hps0+7Rts7pC8pkYfm/edHdBR1gjyRxrw46KJ3JYfxF9g6NcAv2g+OTbsCCs2+rhT+vB0xRR/HqlDI9eaYzVYENoaaVQA/QRMNv7w2sFN/kyZSHWSpnEMqFjjmZE0wNQmFBUXGMB7FBa0IjWCJlAW5Bo/sB9qprsPJDvedbGNHOpSjhZdvUl9vpkKsHljqVNtNbCG/nSu9sSYGLjQ/ksb76g4Fl8bOMrG4UqoQPCZ6setWD+Rpeayv5AYHE2TX3SZcgs30FcDeFb+246wfmrZ4K5C7mXKx+xdPjUbrTVmcT3+S6j5jxQUfmkBmiovL/2l4z3oO1a/xVIs/6jlvkLhIehGfXcK99eOzoW+ynLCrddpMy2aV3QtUpbd7Vnr2SsuPjntgcZ2wT9ZbjvSiOFbRapodS54f7BvG3UHWsr6C9lFi13ue+ag8PeL+Fhcr9HOO3jzZWzxAs6H2Qe9SOuDfPp2eSDDV6QXGY6z+pEmvOpKaVElz5CMw== sysadmin