d0ugal / mistral-ansible-actions

Mistral Actions for calling Ansible
https://pypi.python.org/pypi/mistral-ansible-actions
4 stars 8 forks source link

Please use --limit in place of --args for the ansible-playbook task #5

Closed fultonj closed 7 years ago

fultonj commented 7 years ago

The limit_hosts option for the ansible-playbook action expands the command with '--args':

https://github.com/d0ugal/mistral-ansible-actions/blob/master/mistral_ansible_actions.py#L57

However, this does not seem to be a supported option:

[stack@undercloud ~]$ ansible-playbook --args foo Usage: ansible-playbook playbook.yml

ansible-playbook: error: no such option: --args [stack@undercloud ~]$

The intention behind the example, makes me think it should be the following instead:

[stack@undercloud ~]$ ansible-playbook --help | grep limit -l SUBSET, --limit=SUBSET further limit selected hosts to an additional pattern [stack@undercloud ~]$

Tested this with ansible-playbook 2.2.1.0 and compared to man page:

https://linux.die.net/man/1/ansible-playbook

d0ugal commented 7 years ago

Good spot. That was sloppy of my, I think you can tell how little I have managed to test this experiment.

Thanks for helping iron out the initial issues.