I am testing controller_api module on a playbook.
example playbook
- name: debug all organizations in a loop # use query to return a list
debug:
msg: "Organization description={{ item['description'] }} id={{ item['id'] }}"
loop: "{{ query('awx.awx.controller_api', 'organizations') }}"
loop_control:
label: "{{ item['name'] }}"
and I config tower_cli.cfg with following.
[gerneral]
host= xxx
username =xxx
oauth_token = xxx
verity_ssl = false
and I put the file on my ~/project/playbooks/tower_cli.cfg
playbook runs on localhost with error
“trying to connect to https://127.0.0.1/api/v2/organizations/: URLError <urlopen error [Errno 111] Connection refused>”
I expect to lookup on host from tower_cli.cfg.
please help me to understand for controller_api