diff options
author | Ed Costello <orthanc@users.noreply.github.com> | 2018-02-28 07:30:34 +0100 |
---|---|---|
committer | Will Thames <will@thames.id.au> | 2018-02-28 07:30:34 +0100 |
commit | 645952c13905a84675513a3c1f747d035d0d98cb (patch) | |
tree | 72d4305a2f8e68e012d773cdb41b765bd020ee62 /hacking/aws_config | |
parent | nxos_facts fix and integration tests (#36796) (diff) | |
download | ansible-645952c13905a84675513a3c1f747d035d0d98cb.tar.xz ansible-645952c13905a84675513a3c1f747d035d0d98cb.zip |
Add aws_caller_facts module and use it in setup-iam.yml (#36683)
* Add aws_caller_facts module and use it in setup-iam.yml
This removes the dependency on having the command line AWS tools
installed.
Diffstat (limited to 'hacking/aws_config')
-rw-r--r-- | hacking/aws_config/setup-iam.yml | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/hacking/aws_config/setup-iam.yml b/hacking/aws_config/setup-iam.yml index 8132e27bb5..fffc04ac72 100644 --- a/hacking/aws_config/setup-iam.yml +++ b/hacking/aws_config/setup-iam.yml @@ -25,13 +25,12 @@ when: iam_group is not defined - name: Get aws account ID - command: aws sts get-caller-identity --output text --query 'Account' "{{ '--profile=' ~ profile if profile else '' }}" - changed_when: False - register: aws_account_command + aws_caller_facts: + register: aws_caller_facts - name: Set aws_account_fact set_fact: - aws_account: "{{ aws_account_command.stdout }}" + aws_account: "{{ aws_caller_facts.account }}" - name: Ensure Managed IAM policies exist |