Only for my Ubuntu (for now).
$ sudo apt install ansible
$ ansible-playbook -e user="foo" group="bar" local.yaml -K
-K
(--ask-become-pass
) To specify a password for sudo.
$ ./run-sudo-ansible-playbook.sh
$ docker run --rm -v $PWD:/ansible -it ubuntu bash
# cd /ansible
# ./run-sudo-ansible-playbook.sh
or only "web"
# ./run-sudo-ansible-playbook.sh --tags "web"
or "ubuntu" and "docker" (and using verbose)
# ./run-sudo-ansible-playbook.sh --tags "ubuntu,docker" -vv
Verbose options:
- -v
- -vv
- -vvv
- -vvvv
$ ansible-playbook local.yaml --list-tasks