Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 794 Bytes

README.rst

File metadata and controls

37 lines (23 loc) · 794 Bytes

ansible-playbook-wrapper

wrapper for ansible-playbook CLI.

dependencies

  • python2.7(argparse module)
  • ansible
  • pytest

install

$ git clone https://github.com/succhiello/ansible-playbook-wrapper.git
$ cd ansible-playbook-wrapper
$ python setup.py install

usage

$ 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.