mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-06-10 18:55:53 +00:00
Most tests have simply been using the Tests as name, but this there is a lack of information in automated runs. The name should be similar to the test file name.
92 lines
2.2 KiB
YAML
92 lines
2.2 KiB
YAML
---
|
|
- name: Test hbacsvcgroup
|
|
hosts: ipaserver
|
|
become: true
|
|
gather_facts: false
|
|
|
|
tasks:
|
|
- name: Ensure HBAC Service Group login is absent
|
|
ipahbacsvcgroup:
|
|
ipaadmin_password: MyPassword123
|
|
name: login
|
|
state: absent
|
|
|
|
- name: Ensure HBAC Service for sshd is present
|
|
ipahbacsvc:
|
|
ipaadmin_password: MyPassword123
|
|
name: login
|
|
|
|
- name: Ensure HBAC Service Group login is present
|
|
ipahbacsvcgroup:
|
|
ipaadmin_password: MyPassword123
|
|
name: login
|
|
register: result
|
|
failed_when: not result.changed
|
|
|
|
- name: Ensure HBAC Service Group login is present again
|
|
ipahbacsvcgroup:
|
|
ipaadmin_password: MyPassword123
|
|
name: login
|
|
register: result
|
|
failed_when: result.changed
|
|
|
|
- name: Ensure HBAC Service sshd is present in HBAC Service Group login
|
|
ipahbacsvcgroup:
|
|
ipaadmin_password: MyPassword123
|
|
name: login
|
|
hbacsvc:
|
|
- sshd
|
|
action: member
|
|
register: result
|
|
failed_when: not result.changed
|
|
|
|
- name: Ensure HBAC Service sshd is present in HBAC Service Group login again
|
|
ipahbacsvcgroup:
|
|
ipaadmin_password: MyPassword123
|
|
name: login
|
|
hbacsvc:
|
|
- sshd
|
|
action: member
|
|
register: result
|
|
failed_when: result.changed
|
|
|
|
- name: Ensure HBAC Services sshd and foo are absent in HBAC Service Group login
|
|
ipahbacsvcgroup:
|
|
ipaadmin_password: MyPassword123
|
|
name: login
|
|
hbacsvc:
|
|
- sshd
|
|
- foo
|
|
action: member
|
|
state: absent
|
|
register: result
|
|
failed_when: not result.changed
|
|
|
|
- name: Ensure HBAC Services sshd and foo are absent in HBAC Service Group login again
|
|
ipahbacsvcgroup:
|
|
ipaadmin_password: MyPassword123
|
|
name: login
|
|
hbacsvc:
|
|
- sshd
|
|
- foo
|
|
action: member
|
|
state: absent
|
|
register: result
|
|
failed_when: result.changed
|
|
|
|
- name: Ensure HBAC Service Group login is absent
|
|
ipahbacsvcgroup:
|
|
ipaadmin_password: MyPassword123
|
|
name: login
|
|
state: absent
|
|
register: result
|
|
failed_when: not result.changed
|
|
|
|
- name: Ensure HBAC Service Group login is absent again
|
|
ipahbacsvcgroup:
|
|
ipaadmin_password: MyPassword123
|
|
name: login
|
|
state: absent
|
|
register: result
|
|
failed_when: result.changed
|