mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 15:36:04 -03:30
Complete Sat6 integration
Various fixes to get sat-6 integration working. * inventory_import.py - the inventory script is called foreman.py * tasks.py - be sure to call `add_section()` before using it * defaults.py - Add various SATELLITE6_* enablement variables Relates #3119
This commit is contained in:
@@ -481,6 +481,7 @@ def load_inventory_source(source, all_group=None, group_filter_re=None,
|
|||||||
# Sanity check: We sanitize these module names for our API but Ansible proper doesn't follow
|
# Sanity check: We sanitize these module names for our API but Ansible proper doesn't follow
|
||||||
# good naming conventions
|
# good naming conventions
|
||||||
source = source.replace('azure.py', 'windows_azure.py')
|
source = source.replace('azure.py', 'windows_azure.py')
|
||||||
|
source = source.replace('satellite6.py', 'foreman.py')
|
||||||
logger.debug('Analyzing type of source: %s', source)
|
logger.debug('Analyzing type of source: %s', source)
|
||||||
original_all_group = all_group
|
original_all_group = all_group
|
||||||
if not os.path.exists(source):
|
if not os.path.exists(source):
|
||||||
|
|||||||
@@ -1299,9 +1299,11 @@ class RunInventoryUpdate(BaseTask):
|
|||||||
cp.set(section, 'password', decrypt_field(credential, 'password'))
|
cp.set(section, 'password', decrypt_field(credential, 'password'))
|
||||||
|
|
||||||
section = 'ansible'
|
section = 'ansible'
|
||||||
|
cp.add_section(section)
|
||||||
cp.set(section, 'group_patterns', '["{app}-{tier}-{color}", "{app}-{color}", "{app}", "{tier}"]')
|
cp.set(section, 'group_patterns', '["{app}-{tier}-{color}", "{app}-{color}", "{app}", "{tier}"]')
|
||||||
|
|
||||||
section = 'cache'
|
section = 'cache'
|
||||||
|
cp.add_section(section)
|
||||||
cp.set(section, 'path', '/tmp')
|
cp.set(section, 'path', '/tmp')
|
||||||
cp.set(section, 'max_age', '0')
|
cp.set(section, 'max_age', '0')
|
||||||
|
|
||||||
|
|||||||
0
awx/plugins/inventory/cloudforms.py
Normal file → Executable file
0
awx/plugins/inventory/cloudforms.py
Normal file → Executable file
1
awx/plugins/inventory/foreman.py
Normal file → Executable file
1
awx/plugins/inventory/foreman.py
Normal file → Executable file
@@ -4,7 +4,6 @@
|
|||||||
#
|
#
|
||||||
# vim: set fileencoding=utf-8 :
|
# vim: set fileencoding=utf-8 :
|
||||||
#
|
#
|
||||||
# Copyright (C) 2016 Guido Günther <agx@sigxcpu.org>
|
|
||||||
#
|
#
|
||||||
# This script is free software: you can redistribute it and/or modify
|
# This script is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -672,6 +672,16 @@ OPENSTACK_HOST_FILTER = r'^.+$'
|
|||||||
OPENSTACK_EXCLUDE_EMPTY_GROUPS = True
|
OPENSTACK_EXCLUDE_EMPTY_GROUPS = True
|
||||||
OPENSTACK_INSTANCE_ID_VAR = 'openstack.id'
|
OPENSTACK_INSTANCE_ID_VAR = 'openstack.id'
|
||||||
|
|
||||||
|
# ---------------------
|
||||||
|
# ----- Foreman -----
|
||||||
|
# ---------------------
|
||||||
|
SATELLITE6_ENABLED_VAR = 'foreman.enabled'
|
||||||
|
SATELLITE6_ENABLED_VALUE = 'true'
|
||||||
|
SATELLITE6_GROUP_FILTER = r'^.+$'
|
||||||
|
SATELLITE6_HOST_FILTER = r'^.+$'
|
||||||
|
SATELLITE6_EXCLUDE_EMPTY_GROUPS = True
|
||||||
|
SATELLITE6_INSTANCE_ID_VAR = 'foreman.uuid'
|
||||||
|
|
||||||
# ---------------------
|
# ---------------------
|
||||||
# -- Activity Stream --
|
# -- Activity Stream --
|
||||||
# ---------------------
|
# ---------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user