1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[cloud] Fix setup_iam to use policy_name, not PolicyName (#26880)

Update setup_iam.yml to work with latest iam_managed_policies
module, which correctly snakifies the results
This commit is contained in:
Will Thames 2017-07-28 21:50:07 +10:00 committed by Ryan Brown
parent 6d1bd33aa5
commit f3bc8b84b6

View file

@ -43,9 +43,12 @@
with_fileglob: "testing_policies/*" with_fileglob: "testing_policies/*"
register: iam_managed_policies register: iam_managed_policies
- debug:
msg: "{{ iam_managed_policies | json_query('results[].policy.policy_name') }}"
- name: Ensure IAM group exists and attach managed policies - name: Ensure IAM group exists and attach managed policies
iam_group: iam_group:
name: "{{ iam_group }}" name: "{{ iam_group }}"
state: present state: present
managed_policy: "{{ iam_managed_policies | json_query('results[].policy.PolicyName') }}" managed_policy: "{{ iam_managed_policies | json_query('results[].policy.policy_name') }}"
profile: "{{ profile|default(omit) }}" profile: "{{ profile|default(omit) }}"