mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
More refinement of examples
This commit is contained in:
@@ -187,13 +187,12 @@
|
||||
that:
|
||||
- "'admin' in results.msg"
|
||||
|
||||
- name: Lookup any users who are admins and get their objects directly
|
||||
set_fact:
|
||||
admin_user_object: "{{ lookup('awx.awx.tower_api', 'users', query_params={ 'is_superuser': true } ) }}"
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "'count' not in admin_user_object"
|
||||
- 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.tower_api', 'organizations') }}"
|
||||
loop_control:
|
||||
label: "{{ item['name'] }}"
|
||||
|
||||
- name: Make sure user 'john' is an org admin of the default org if the user exists
|
||||
tower_role:
|
||||
|
||||
Reference in New Issue
Block a user