wrapper for ansible-playbook CLI.
- python2.7(argparse module)
- ansible
- pytest
$ git clone https://github.com/succhiello/ansible-playbook-wrapper.git $ cd ansible-playbook-wrapper $ python setup.py install
$ ansible-playbook-wrapper play -e 'hosts=personal users=kiri,gimlet,succhiello' playbook.yml -i inventories/production
will execute below.
ansible-playbook playbook.yml -i inventories/production -e '{"hosts": "personal", "users": ["kiri", "gimlet", "succhiello"]}'
ansible-playbook-wrapper converts 'extra-vars' option from 'key=value' to JSON, and executes with the remainder of arguments internally.
'extra-vars' and yml argument is positional.