2017-02-19 13:56:47 +01:00
|
|
|
#!/bin/bash
|
2018-09-05 12:23:30 +02:00
|
|
|
set -e
|
2017-02-19 13:56:47 +01:00
|
|
|
if (( $EUID != 0 )); then
|
2017-12-16 18:02:33 +01:00
|
|
|
echo "This script must be run using sudo -H or as root"
|
2017-02-19 13:56:47 +01:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
# update packages
|
2018-09-05 12:23:30 +02:00
|
|
|
apt update
|
|
|
|
apt -y install software-properties-common
|
2018-10-05 17:49:39 +02:00
|
|
|
add-apt-repository -y ppa:ansible/ansible-2.7
|
2018-09-05 12:23:30 +02:00
|
|
|
|
2017-02-19 13:56:47 +01:00
|
|
|
# install required packages
|
2018-08-10 10:52:10 +02:00
|
|
|
apt-get -y install --no-install-recommends ansible python-jmespath
|
2017-03-08 14:48:58 +01:00
|
|
|
|
|
|
|
# TODO: run ansible on local host
|
2019-05-06 18:27:12 +02:00
|
|
|
ansible-playbook yavdr07.yml -b -i 'localhost_inventory' --connection=local --tags="all"
|