Use STS Assumed-Role to query EC2 inventory - Does this work?

93 views
Skip to first unread message

slikk66

unread,
Mar 17, 2015, 2:54:17 PM3/17/15
to ansible...@googlegroups.com

Hi guys, don’t kill me.  new-ish, to Ansible.  I've already searched and tried the #irc room, no luck so far.

Trying to run Asgard playbook from https://github.com/Answers4AWS/netflixoss-ansible.  I’ve already gotten ICE working on my own account, but on this one trying to set it up on a cross-account IAM role (my user creating the EC2 on another account over the CLI after assuming a role that gives me the permission to do so!)

I’ve assumed the role from the aws CLI, but running the ec2 inventory script (/etc/ansible/hosts) still shows my account's ec2 servers, not the assumed role.  

Is what I'm trying to do supported?  I want to run the playbook on “tag_Name_Asgard” but on a box on the assumed role.

This is the closet topic I've found: https://github.com/ansible/ansible/issues/9647

- but seems to be talking about the role on an EC2 machine if you're running the inventory from that, so not the same I don't think.

It does mention needing boto 2.5.0 > , I do see that I'm at 2.36.0, but it won't let me upgrade further with pip (python 2.7.5 + centos7)

THANKS!!

Arbab Nazar

unread,
Mar 10, 2016, 7:46:53 AM3/10/16
to Ansible Project
Hi, did you manage to make it work? if so please share your experience. Thanks
Reply all
Reply to author
Forward
0 new messages