From ee3a90d19331426133171f07ddc7dea9cdacacfe Mon Sep 17 00:00:00 2001 From: John Westcott IV Date: Wed, 16 Sep 2020 14:52:41 -0400 Subject: [PATCH] Adding example of specifying connection info --- awx_collection/plugins/lookup/tower_api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/awx_collection/plugins/lookup/tower_api.py b/awx_collection/plugins/lookup/tower_api.py index 8f0f3ab438..a10d9c4c8e 100644 --- a/awx_collection/plugins/lookup/tower_api.py +++ b/awx_collection/plugins/lookup/tower_api.py @@ -72,6 +72,10 @@ EXAMPLES = """ set_fact: tower_settings: "{{ lookup('awx.awx.tower_api', 'settings/ui') }}" +- name: Load the UI settings specifying the connection info + set_fact: + tower_settings: "{{ lookup('awx.awx.tower_api', 'settings/ui' host='tower.example.com', username='admin', password=my_pass_var, verify_ssl=False) }}" + - name: Report the usernames of all users with admin privs debug: msg: "Admin users: {{ query('awx.awx.tower_api', 'users', query_params={ 'is_superuser': true }) | map(attribute='username') | join(', ') }}"