ansible-api
ansible-api copied to clipboard
The parameter h is not applied in Playbook mode
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