f6f5dc59ca
so ansible_virtualization_type and ansible_virtualization_role are always defined. This ist important on older Hardware (e.g. AMD64 3000+).
18 lines
485 B
Bash
Executable File
18 lines
485 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
if (( $EUID != 0 )); then
|
|
echo "This script must be run using sudo -H or as root"
|
|
exit
|
|
fi
|
|
|
|
# update packages
|
|
apt update
|
|
apt -y install software-properties-common
|
|
add-apt-repository -y ppa:ansible/ansible-2.6
|
|
|
|
# install required packages
|
|
apt-get -y install --no-install-recommends ansible python-jmespath
|
|
|
|
# TODO: run ansible on local host
|
|
ansible-playbook yavdr07.yml -b -i 'localhost_inventory' --connection=local --tags="all" --extra-vars "first_run=True"
|