ansible-api icon indicating copy to clipboard operation
ansible-api copied to clipboard

The parameter h is not applied in Playbook mode

Open slefol opened this issue 5 years ago • 0 comments

In playbook mode, the playbook is executed for all hosts defined in the playbook file (hosts parameter) instead of the devices defined by h parameter.

In controller.py (line 169), ansible_runner.interface.run() is call with host_pattern param except : :param host_pattern: The host pattern to match when running in ad-hoc mode.

host_pattern should not be used in playbook mode. you should use limit parameter instead: :param limit: Matches ansible's --limit parameter to further constrain the inventory to be used

slefol avatar Nov 20 '20 18:11 slefol