From f3bc8b84b69daf549ed5267724098522c5472c15 Mon Sep 17 00:00:00 2001 From: Will Thames Date: Fri, 28 Jul 2017 21:50:07 +1000 Subject: [PATCH] [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 --- hacking/aws_config/setup-iam.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hacking/aws_config/setup-iam.yml b/hacking/aws_config/setup-iam.yml index 4b53de945a..54c5950e85 100644 --- a/hacking/aws_config/setup-iam.yml +++ b/hacking/aws_config/setup-iam.yml @@ -43,9 +43,12 @@ with_fileglob: "testing_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 iam_group: name: "{{ iam_group }}" 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) }}"