mirror of
https://github.com/ansible/awx.git
synced 2026-03-16 16:37:30 -02:30
Merge pull request #66 from jangsutsr/3467_move_satellite_ini_config_from_env_to_source_var
Move Satellite 6 .ini configurations from env variables to source_vars
This commit is contained in:
@@ -1633,8 +1633,7 @@ class RunInventoryUpdate(BaseTask):
|
||||
ec2_opts.setdefault('route53', 'False')
|
||||
ec2_opts.setdefault('all_instances', 'True')
|
||||
ec2_opts.setdefault('all_rds_instances', 'False')
|
||||
# TODO: Include this option when boto3 support comes.
|
||||
#ec2_opts.setdefault('include_rds_clusters', 'False')
|
||||
ec2_opts.setdefault('include_rds_clusters', 'False')
|
||||
ec2_opts.setdefault('rds', 'False')
|
||||
ec2_opts.setdefault('nested_groups', 'True')
|
||||
ec2_opts.setdefault('elasticache', 'False')
|
||||
@@ -1676,10 +1675,17 @@ class RunInventoryUpdate(BaseTask):
|
||||
section = 'foreman'
|
||||
cp.add_section(section)
|
||||
|
||||
group_patterns = '[]'
|
||||
group_prefix = 'foreman_'
|
||||
foreman_opts = dict(inventory_update.source_vars_dict.items())
|
||||
foreman_opts.setdefault('ssl_verify', 'False')
|
||||
for k, v in foreman_opts.items():
|
||||
cp.set(section, k, unicode(v))
|
||||
if k == 'satellite6_group_patterns' and isinstance(v, basestring):
|
||||
group_patterns = v
|
||||
elif k == 'satellite6_group_prefix' and isinstance(v, basestring):
|
||||
group_prefix = v
|
||||
else:
|
||||
cp.set(section, k, unicode(v))
|
||||
|
||||
credential = inventory_update.credential
|
||||
if credential:
|
||||
@@ -1689,9 +1695,9 @@ class RunInventoryUpdate(BaseTask):
|
||||
|
||||
section = 'ansible'
|
||||
cp.add_section(section)
|
||||
cp.set(section, 'group_patterns', os.environ.get('SATELLITE6_GROUP_PATTERNS', []))
|
||||
cp.set(section, 'group_patterns', group_patterns)
|
||||
cp.set(section, 'want_facts', True)
|
||||
cp.set(section, 'group_prefix', os.environ.get('SATELLITE6_GROUP_PREFIX', 'foreman_'))
|
||||
cp.set(section, 'group_prefix', group_prefix)
|
||||
|
||||
section = 'cache'
|
||||
cp.add_section(section)
|
||||
|
||||
Reference in New Issue
Block a user