Skip to content

Commit

Permalink
✨ added playbook shell script to main
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurcadore authored Apr 23, 2024
1 parent 693afe3 commit e2002b4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ mkdir /run/sshd
echo "###################################################################"
echo "Booting the H3C comware library..."

python3 /ansible/setup.py install
cd /ansible/
python3 setup.py install

echo "###################################################################"
echo "displaying the users list and SSH access port..."
Expand All @@ -34,5 +35,10 @@ netstat -tuln
# display the configured users:
cat /etc/passwd

echo "###################################################################"
echo "Execute playbooks script..."

./playbooks.sh

# Keep the script running by tailing /dev/null
tail -f /dev/null
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ services:
# Mount local directories as volumes inside the container:
volumes:
- "./inventory/:/ansible/inventory/"
- "./playbooks/playbooks.sh:/ansible/playbooks.sh"
- "./playbooks/:/ansible/playbooks/"
- "./config/hosts:/etc/hosts"
- "./libs/:/ansible/"
Expand Down
3 changes: 3 additions & 0 deletions playbooks/playbooks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

## Execute ansible example playbook
ansible-playbook -i inventory/hosts switch.yaml

0 comments on commit e2002b4

Please sign in to comment.