- Ubuntu-18.04 LTS (Bionic Beaver)
- Ubuntu-20.04 LTS (Focal Fossa)
First of all, you need to install ansible before running ansible-playbook.
$ ./scripts/install-ansible.sh
If you use Ubuntu 18.04, install ansible with the following command.
$ sudo apt update
$ sudo apt install software-properties-common
$ sudo apt-add-repository --yes --update ppa:ansible/ansible
$ sudo apt install ansible python-apt
Run ansible-playbook with --dry-run mode.
$ ansible-playbook -i inventory/hosts.ini -l focal playbook.yml --diff --check
Run ainsble-playbook
$ ansible-playbook -i inventory/hosts.ini -l focal playbook.yml --diff
The first time you run ansible-playbook, you will need a sudo password.
After running ansible-playbook, the execution user is registered in sudoers.
$ ansible-playbook -i inventory/hosts.ini -l focal playbook.yml --diff --ask-become-pass