Debian Codegraph @

ansible_collections/amazon/aws/tests/integration/targets/iam_group/tasks/path.yml

raw
1 ---
2 # Path management
3
4 - name: Set path (check_mode)
5 amazon.aws.iam_group:
6 name: "{{ test_group }}"
7 path: "{{ test_path }}"
8 state: present
9 register: iam_group
10 check_mode: true
11
12 - ansible.builtin.assert:
13 that:
14 - iam_group is changed
15
16 - name: Set path
17 amazon.aws.iam_group:
18 name: "{{ test_group }}"
19 path: "{{ test_path }}"
20 state: present
21 register: iam_group
22
23 - ansible.builtin.assert:
24 that:
25 - iam_group is changed
26 - "'users' in iam_group.iam_group"
27 - "'group' in iam_group.iam_group"
28 - iam_group.iam_group.group.group_name == test_group
29 - iam_group.iam_group.group.path == test_path
30
31 - name: Retry set path (check_mode)
32 amazon.aws.iam_group:
33 name: "{{ test_group }}"
34 path: "{{ test_path }}"
35 state: present
36 register: iam_group
37 check_mode: true
38
39 - ansible.builtin.assert:
40 that:
41 - iam_group is not changed
42
43 - name: Retry set path
44 amazon.aws.iam_group:
45 name: "{{ test_group }}"
46 path: "{{ test_path }}"
47 state: present
48 register: iam_group
49
50 - ansible.builtin.assert:
51 that:
52 - iam_group is not changed
53 - "'users' in iam_group.iam_group"
54 - "'group' in iam_group.iam_group"
55 - iam_group.iam_group.group.group_name == test_group
56 - iam_group.iam_group.group.path == test_path
57
58 # /end Path management