debian.ansible.docker/build-debian-env.sh

18 lines
405 B
Bash
Raw Normal View History

2023-04-28 15:15:53 +02:00
#!/bin/bash -xe
# install ansible
2023-04-28 15:18:55 +02:00
apt-get -y install python3-pip git
pip install ansible
2023-04-28 15:15:53 +02:00
cd /root
rm -rf $(hostname -s)-git
mkdir $(hostname -s)-git
cd $(hostname -s)-git
# run ansible playbooks
2023-04-28 15:21:09 +02:00
for playbook in debian.ansible.basics
2023-04-28 15:15:53 +02:00
do
git clone https://gitea.ds9.dedyn.io/olli/${playbook}.git
2023-04-28 15:18:55 +02:00
ansible-playbook --connection=local --inventory $(hostname), --limit $(hostname) ${playbook}/*.yml
2023-04-28 15:15:53 +02:00
done