mirror of
https://github.com/ansible/awx.git
synced 2026-02-25 23:16:01 -03:30
pass iam_role_arn through to aws inv. plugin
This commit is contained in:
@@ -2027,6 +2027,9 @@ class ec2(PluginFileInjector):
|
||||
grouping_data['key'] += ' | regex_replace("{rx}", "_")'.format(rx=legacy_regex)
|
||||
# end compatibility content
|
||||
|
||||
if source_vars.get('iam_role_arn', None):
|
||||
ret['iam_role_arn'] = source_vars['iam_role_arn']
|
||||
|
||||
# This was an allowed ec2.ini option, also plugin option, so pass through
|
||||
if source_vars.get('boto_profile', None):
|
||||
ret['boto_profile'] = source_vars['boto_profile']
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
boto_profile: /tmp/my_boto_stuff
|
||||
iam_role_arn: arn:aws:iam::123456789012:role/test-role
|
||||
compose:
|
||||
ansible_host: public_ip_address
|
||||
ec2_account_id: owner_id
|
||||
|
||||
@@ -38,7 +38,8 @@ TEST_SOURCE_FIELDS = {
|
||||
|
||||
INI_TEST_VARS = {
|
||||
'ec2': {
|
||||
'boto_profile': '/tmp/my_boto_stuff'
|
||||
'boto_profile': '/tmp/my_boto_stuff',
|
||||
'iam_role_arn': 'arn:aws:iam::123456789012:role/test-role'
|
||||
},
|
||||
'gce': {},
|
||||
'openstack': {
|
||||
|
||||
Reference in New Issue
Block a user