mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
77 lines
1.3 KiB
YAML
77 lines
1.3 KiB
YAML
|
- name: Create a User
|
||
|
tower_user:
|
||
|
first_name: Joe
|
||
|
last_name: User
|
||
|
username: joe
|
||
|
password: "{{ 65535 | random | to_uuid }}"
|
||
|
email: joe@example.org
|
||
|
state: present
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- "result is changed"
|
||
|
|
||
|
- name: Delete a User
|
||
|
tower_user:
|
||
|
username: joe
|
||
|
email: joe@example.org
|
||
|
state: absent
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- "result is changed"
|
||
|
|
||
|
- name: Create an Auditor
|
||
|
tower_user:
|
||
|
first_name: Joe
|
||
|
last_name: Auditor
|
||
|
username: joe
|
||
|
password: "{{ 65535 | random | to_uuid }}"
|
||
|
email: joe@example.org
|
||
|
state: present
|
||
|
auditor: true
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- "result is changed"
|
||
|
|
||
|
- name: Delete an Auditor
|
||
|
tower_user:
|
||
|
username: joe
|
||
|
email: joe@example.org
|
||
|
state: absent
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- "result is changed"
|
||
|
|
||
|
- name: Create a Superuser
|
||
|
tower_user:
|
||
|
first_name: Joe
|
||
|
last_name: Super
|
||
|
username: joe
|
||
|
password: "{{ 65535 | random | to_uuid }}"
|
||
|
email: joe@example.org
|
||
|
state: present
|
||
|
superuser: true
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- "result is changed"
|
||
|
|
||
|
- name: Delete a Superuser
|
||
|
tower_user:
|
||
|
username: joe
|
||
|
email: joe@example.org
|
||
|
state: absent
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- "result is changed"
|