2017-02-19 13:56:47 +01:00
|
|
|
#!/bin/bash
|
|
|
|
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
|
|
|
|
|
2017-12-16 19:34:33 +01:00
|
|
|
apt-get -y install software-properties-common
|
|
|
|
# Add repository for ansible
|
|
|
|
add-apt-repository -y ppa:yavdr/experimental-main
|
2017-02-19 13:56:47 +01:00
|
|
|
# update packages
|
|
|
|
apt-get update
|
|
|
|
# install required packages
|
2017-11-22 11:36:00 +01:00
|
|
|
apt-get -y install --no-install-recommends ansible
|
2017-03-08 14:48:58 +01:00
|
|
|
|
|
|
|
# TODO: run ansible on local host
|
2018-01-07 17:40:29 +01:00
|
|
|
ansible-playbook yavdr07.yml -b -i 'localhost_inventory' --connection=local --tags="all"
|