2017-07-31 18:10:57 +00:00
|
|
|
- name: Gather facts
|
|
|
|
setup:
|
|
|
|
|
|
|
|
- name: Remove potentially leftover test group
|
|
|
|
win_group: &wg_absent
|
2017-08-02 02:06:39 +00:00
|
|
|
name: WinGroupMembershipTest
|
2017-07-31 18:10:57 +00:00
|
|
|
state: absent
|
|
|
|
|
2018-06-27 00:54:27 +00:00
|
|
|
- name: Remove potentially leftover test user
|
|
|
|
win_user: &wu_absent
|
|
|
|
name: WinTestUser
|
|
|
|
state: absent
|
|
|
|
|
2017-07-31 18:10:57 +00:00
|
|
|
- name: Add new test group
|
|
|
|
win_group:
|
2017-08-02 02:06:39 +00:00
|
|
|
name: WinGroupMembershipTest
|
2017-07-31 18:10:57 +00:00
|
|
|
state: present
|
|
|
|
|
2018-06-27 00:54:27 +00:00
|
|
|
- name: Add new test user
|
|
|
|
win_user:
|
|
|
|
name: WinTestUser
|
|
|
|
password: "W1nGr0upM3mb3rsh1pT3$tP@$$w0rd"
|
|
|
|
state: present
|
|
|
|
|
2017-08-02 02:06:39 +00:00
|
|
|
- name: Run tests for win_group_membership
|
2017-07-31 18:10:57 +00:00
|
|
|
block:
|
|
|
|
|
|
|
|
- name: Test in normal mode
|
2018-01-07 04:05:15 +00:00
|
|
|
import_tasks: tests.yml
|
2017-07-31 18:10:57 +00:00
|
|
|
vars:
|
2017-08-02 02:06:39 +00:00
|
|
|
win_local_group: WinGroupMembershipTest
|
2018-06-27 00:54:27 +00:00
|
|
|
win_local_user: WinTestUser
|
2017-07-31 18:10:57 +00:00
|
|
|
in_check_mode: no
|
|
|
|
|
|
|
|
- name: Test in check-mode
|
2018-01-07 04:05:15 +00:00
|
|
|
import_tasks: tests.yml
|
2017-07-31 18:10:57 +00:00
|
|
|
vars:
|
2017-08-02 02:06:39 +00:00
|
|
|
win_local_group: WinGroupMembershipTest
|
2018-06-27 00:54:27 +00:00
|
|
|
win_local_user: WinTestUser
|
2017-07-31 18:10:57 +00:00
|
|
|
in_check_mode: yes
|
|
|
|
check_mode: yes
|
|
|
|
|
|
|
|
- name: Remove test group
|
|
|
|
win_group: *wg_absent
|
2018-06-27 00:54:27 +00:00
|
|
|
|
|
|
|
- name: Remove test user
|
|
|
|
win_group: *wu_absent
|