Debian Codegraph @

ansible_collections/community/aws/tests/integration/targets/wafv2_rule_group/tasks/description.yml

raw
1 - name: Tests relating to setting the descriptions of wavf2_ip_sets
2 vars:
3 description_one: 'a Description - {{ resource_prefix }}'
4 description_two: 'Another_Description - {{ resource_prefix }}'
5 # Mandatory settings
6 module_defaults:
7 community.aws.wafv2_rule_group:
8 name: '{{ rule_group_name }}'
9 state: present
10 scope: REGIONAL
11 purge_rules: no
12 rules: []
13 capacity: 500
14 community.aws.wafv2_rule_group_info:
15 name: '{{ rule_group_name }}'
16 scope: REGIONAL
17 block:
18
19 - name: test setting description wafv2_rule_group (check mode)
20 wafv2_rule_group:
21 description: '{{ description_one }}'
22 register: update_result
23 check_mode: yes
24 - name: assert that update succeeded
25 assert:
26 that:
27 - update_result is changed
28
29 - name: test setting description wafv2_rule_group
30 wafv2_rule_group:
31 description: '{{ description_one }}'
32 register: update_result
33 - name: assert that update succeeded
34 assert:
35 that:
36 - update_result is changed
37 - update_result.description == description_one
38
39 - name: test setting description wafv2_rule_group - idempotency (check mode)
40 wafv2_rule_group:
41 description: '{{ description_one }}'
42 register: update_result
43 check_mode: yes
44 - name: assert that update succeeded
45 assert:
46 that:
47 - update_result is not changed
48
49 - name: test setting description wafv2_rule_group - idempotency
50 wafv2_rule_group:
51 description: '{{ description_one }}'
52 register: update_result
53 - name: assert that update succeeded
54 assert:
55 that:
56 - update_result is not changed
57 - update_result.description == description_one
58
59 ###
60
61 - name: test updating description on wafv2_rule_group (check mode)
62 wafv2_rule_group:
63 description: '{{ description_two }}'
64 register: update_result
65 check_mode: yes
66 - name: assert that update succeeded
67 assert:
68 that:
69 - update_result is changed
70
71 - name: test updating description on wafv2_rule_group
72 wafv2_rule_group:
73 description: '{{ description_two }}'
74 register: update_result
75 - name: assert that update succeeded
76 assert:
77 that:
78 - update_result is changed
79 - update_result.description == description_two
80
81 - name: test updating description on wafv2_rule_group - idempotency (check mode)
82 wafv2_rule_group:
83 description: '{{ description_two }}'
84 register: update_result
85 check_mode: yes
86 - name: assert that update succeeded
87 assert:
88 that:
89 - update_result is not changed
90
91 - name: test updating description on wafv2_rule_group - idempotency
92 wafv2_rule_group:
93 description: '{{ description_two }}'
94 register: update_result
95 - name: assert that update succeeded
96 assert:
97 that:
98 - update_result is not changed
99 - update_result.description == description_two
100
101 ###
102
103 - name: test that wafv2_rule_group_info returns the description
104 wafv2_rule_group_info:
105 register: tag_info
106 - name: assert description present
107 assert:
108 that:
109 - tag_info.description == description_two
110
111 ###
112
113 - name: test no description param wafv2_rule_group (check mode)
114 wafv2_rule_group: {}
115 register: update_result
116 check_mode: yes
117 - name: assert no change
118 assert:
119 that:
120 - update_result is not changed
121 - update_result.description == description_two
122
123
124 - name: test no description param wafv2_rule_group
125 wafv2_rule_group: {}
126 register: update_result
127 - name: assert no change
128 assert:
129 that:
130 - update_result is not changed
131 - update_result.description == description_two