mirror of
https://github.com/ansible/awx.git
synced 2026-08-03 11:30:00 -02:30
Add support for ec2 inventory plugin
This commit is contained in:
@@ -1942,8 +1942,20 @@ class azure_rm(PluginFileInjector):
|
||||
|
||||
|
||||
class ec2(PluginFileInjector):
|
||||
plugin_name = 'aws_ec2'
|
||||
initial_version = '2.5'
|
||||
ini_env_reference = 'EC2_INI_PATH'
|
||||
|
||||
def inventory_as_dict(self, inventory_source):
|
||||
ret = dict(
|
||||
plugin='aws_ec2',
|
||||
)
|
||||
# TODO: all regions currently failing due to:
|
||||
# https://github.com/ansible/ansible/pull/48079
|
||||
if inventory_source.source_regions and 'all' not in inventory_source.source_regions:
|
||||
ret['regions'] = inventory_source.source_regions.split(',')
|
||||
return ret
|
||||
|
||||
def build_script_private_data(self, inventory_update, private_data_dir):
|
||||
cp = configparser.RawConfigParser()
|
||||
# Build custom ec2.ini for ec2 inventory script to use.
|
||||
|
||||
Reference in New Issue
Block a user