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

20 lines
453 B
Bash
Raw Normal View History

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