Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple assume roles to get collective inventory #1908

Open
1 task done
chandrakanthkannam opened this issue Dec 5, 2023 · 1 comment
Open
1 task done

Comments

@chandrakanthkannam
Copy link

Summary

With distributed accounts within the organization and would like to manage from centralized account, to achieve this having a ability to get a collective inventory would help.

Current setup: For example below acc-1.aws_ec2.yamll is assuming role from acc-1 and pulls inventory only from acc-1 across the mentioned regions.

plugin: aws_ec2
assume_role_arn: arn:aws:iam::<acc-id-1>:role/<role-name>

regions:
  - us-west-2
  - eu-central-1
  - ap-southeast-2

keyed_groups:
  - key: tags.Name
    separator: ""

hostnames:
  - 'private-ip-address'

Proposed setup: This below file will give collective inventory from all the mentioned account, all-acc.aws_ec2.yml and across all regions.

plugin: aws_ec2
assume_role_arns:
  - arn:aws:iam::<acc-id-1>:role/<role-name>
  - arn:aws:iam::<acc-id-2>:role/<role-name>
regions:
  - us-west-2
  - eu-central-1
  - ap-southeast-2

keyed_groups:
  - key: tags.Name
    separator: ""

hostnames:
  - 'private-ip-address'

By the proposed setup it will be helpful to manage easily from central account.

Issue Type

Feature Idea

Component Name

aws_ec2

Additional Information

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@chandrakanthkannam
Copy link
Author

This #1830 is implementing the proposed setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants