|
66 | 66 | register: __aws_xaccount_policy |
67 | 67 |
|
68 | 68 | - name: Update AWS Cross Account Policy tags |
69 | | - when: __plat_aws_policy_tags_list |
| 69 | + when: __plat_aws_policy_tags_list is defined |
70 | 70 | ansible.builtin.command: > |
71 | 71 | aws iam tag-policy |
72 | 72 | --policy-arn {{ __aws_xaccount_policy.policy.arn }} |
|
98 | 98 | delay: "{{ 10 | random(start=3, step=1) }}" |
99 | 99 |
|
100 | 100 | - name: Update AWS Cross Account Role tags |
101 | | - when: __plat_aws_role_tags_list |
| 101 | + when: __plat_aws_role_tags_list is defined |
102 | 102 | ansible.builtin.command: > |
103 | 103 | aws iam tag-role |
104 | 104 | --role-name {{ plat__aws_xaccount_role_name }} |
|
132 | 132 | register: __aws_idbroker_assume_role_policy |
133 | 133 |
|
134 | 134 | - name: Update AWS Cross Account Policy tags |
135 | | - when: __plat_aws_policy_tags_list |
| 135 | + when: __plat_aws_policy_tags_list is defined |
136 | 136 | ansible.builtin.command: > |
137 | 137 | aws iam tag-policy |
138 | 138 | --policy-arn {{ __aws_idbroker_assume_role_policy.policy.arn }} |
|
169 | 169 | register: __aws_cdp_data_access_policy_info |
170 | 170 |
|
171 | 171 | - name: Update CDP Data Access Policies tags |
172 | | - when: __plat_aws_policy_tags_list |
| 172 | + when: __plat_aws_policy_tags_list is defined |
173 | 173 | ansible.builtin.command: > |
174 | 174 | aws iam tag-policy |
175 | 175 | --policy-arn {{ __aws_cdp_data_policy_tags_item.policy.arn }} |
176 | 176 | --tags {{ __plat_aws_policy_tags_list | join(' ') }} |
177 | 177 | loop_control: |
178 | 178 | loop_var: __aws_cdp_data_policy_tags_item |
179 | | - label: "{{ __aws_cdp_data_policy_tags_item.policy.name }}" |
| 179 | + label: "{{ __aws_cdp_data_policy_tags_item.policy.policy_name }}" |
180 | 180 | loop: "{{ __aws_cdp_data_access_policy_info.results }}" |
181 | 181 | register: __aws_idbroker_assume_role_policy_tags |
182 | 182 | failed_when: __aws_cdp_data_policy_tags_item.failed |
|
219 | 219 | - "{{ plat__aws_bucket_access_policy_name }}" |
220 | 220 |
|
221 | 221 | - name: Update AWS Service Role tags |
222 | | - when: __plat_aws_role_tags_list |
| 222 | + when: __plat_aws_role_tags_list is defined |
223 | 223 | ansible.builtin.command: > |
224 | 224 | aws iam tag-role |
225 | 225 | --role-name {{ __aws_service_role_tags_item.iam_role.role_name }} |
|
267 | 267 | - "{{ plat__aws_bucket_access_policy_name }}" |
268 | 268 |
|
269 | 269 | - name: Update AWS Data Access Role tags |
270 | | - when: __plat_aws_role_tags_list |
| 270 | + when: __plat_aws_role_tags_list is defined |
271 | 271 | ansible.builtin.command: > |
272 | 272 | aws iam tag-role |
273 | 273 | --role-name {{ __aws_data_access_role_tags_item.iam_role.role_name }} |
|
0 commit comments