Merge "Remove references to tripleo-validations legacy directory"

This commit is contained in:
Zuul 2021-06-06 19:43:01 +00:00 committed by Gerrit Code Review
commit 40ddd739fa
2 changed files with 8 additions and 31 deletions

View File

@ -100,7 +100,6 @@ ENABLE_SSH_ADMIN_SSH_PORT_TIMEOUT = 600
ADDITIONAL_ARCHITECTURES = ['ppc64le'] ADDITIONAL_ARCHITECTURES = ['ppc64le']
DEFAULT_VALIDATIONS_BASEDIR = "/usr/share/ansible" DEFAULT_VALIDATIONS_BASEDIR = "/usr/share/ansible"
DEFAULT_VALIDATIONS_LEGACY_BASEDIR = "/usr/share/openstack-tripleo-validations"
VALIDATIONS_LOG_BASEDIR = '/var/log/validations' VALIDATIONS_LOG_BASEDIR = '/var/log/validations'
@ -112,12 +111,7 @@ DEFAULT_TEMPLATES_DIR = "/usr/share/python-tripleoclient/templates"
TRIPLEO_STATIC_INVENTORY = 'tripleo-ansible-inventory.yaml' TRIPLEO_STATIC_INVENTORY = 'tripleo-ansible-inventory.yaml'
ANSIBLE_INVENTORY = os.path.join(DEFAULT_WORK_DIR, ANSIBLE_INVENTORY = os.path.join(DEFAULT_WORK_DIR,
'{}/', TRIPLEO_STATIC_INVENTORY) '{}/', TRIPLEO_STATIC_INVENTORY)
ANSIBLE_VALIDATION_DIR = ( ANSIBLE_VALIDATION_DIR = "/usr/share/ansible/validation-playbooks"
os.path.join(DEFAULT_VALIDATIONS_LEGACY_BASEDIR, 'playbooks')
if os.path.exists(os.path.join(DEFAULT_VALIDATIONS_LEGACY_BASEDIR,
'playbooks'))
else "/usr/share/ansible/validation-playbooks"
)
# NOTE(mwhahaha): So if we pip install tripleoclient, we need to also # NOTE(mwhahaha): So if we pip install tripleoclient, we need to also
# honor pulling some other files from a venv (e.g. cli playbooks, # honor pulling some other files from a venv (e.g. cli playbooks,
@ -143,12 +137,7 @@ if sys.prefix != "/usr" and not os.path.isdir(CONTAINER_IMAGES_BASE_PATH):
"/usr", "share", "tripleo-common", "container-images" "/usr", "share", "tripleo-common", "container-images"
) )
VALIDATION_GROUPS_INFO = "{}/groups.yaml".format(DEFAULT_VALIDATIONS_BASEDIR)
VALIDATION_GROUPS_INFO = (
'/usr/share/ansible/groups.yaml'
if os.path.exists('/usr/share/ansible/groups.yaml')
else os.path.join(DEFAULT_VALIDATIONS_LEGACY_BASEDIR, 'groups.yaml')
)
# ctlplane network defaults # ctlplane network defaults
CTLPLANE_NET_NAME = 'ctlplane' CTLPLANE_NET_NAME = 'ctlplane'

View File

@ -486,13 +486,11 @@ def run_ansible_playbook(playbook, inventory, workdir, playbook_dir=None,
'/usr/share/ansible/plugins/modules:' '/usr/share/ansible/plugins/modules:'
'/usr/share/ceph-ansible/library:' '/usr/share/ceph-ansible/library:'
'/usr/share/ansible-modules:' '/usr/share/ansible-modules:'
'{}/library:'
'{}/library'.format( '{}/library'.format(
constants.CLOUD_HOME_DIR, constants.CLOUD_HOME_DIR,
os.path.join(workdir, 'modules'), os.path.join(workdir, 'modules'),
os.path.join(cwd, 'modules'), os.path.join(cwd, 'modules'),
constants.DEFAULT_VALIDATIONS_BASEDIR, constants.DEFAULT_VALIDATIONS_BASEDIR
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR
) )
) )
env['ANSIBLE_LOOKUP_PLUGINS'] = os.path.expanduser( env['ANSIBLE_LOOKUP_PLUGINS'] = os.path.expanduser(
@ -501,13 +499,11 @@ def run_ansible_playbook(playbook, inventory, workdir, playbook_dir=None,
'/usr/share/ansible/tripleo-plugins/lookup:' '/usr/share/ansible/tripleo-plugins/lookup:'
'/usr/share/ansible/plugins/lookup:' '/usr/share/ansible/plugins/lookup:'
'/usr/share/ceph-ansible/plugins/lookup:' '/usr/share/ceph-ansible/plugins/lookup:'
'{}/lookup_plugins:'
'{}/lookup_plugins'.format( '{}/lookup_plugins'.format(
constants.CLOUD_HOME_DIR, constants.CLOUD_HOME_DIR,
os.path.join(workdir, 'lookup'), os.path.join(workdir, 'lookup'),
os.path.join(cwd, 'lookup'), os.path.join(cwd, 'lookup'),
constants.DEFAULT_VALIDATIONS_BASEDIR, constants.DEFAULT_VALIDATIONS_BASEDIR
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR
) )
) )
env['ANSIBLE_CALLBACK_PLUGINS'] = os.path.expanduser( env['ANSIBLE_CALLBACK_PLUGINS'] = os.path.expanduser(
@ -516,13 +512,11 @@ def run_ansible_playbook(playbook, inventory, workdir, playbook_dir=None,
'/usr/share/ansible/tripleo-plugins/callback:' '/usr/share/ansible/tripleo-plugins/callback:'
'/usr/share/ansible/plugins/callback:' '/usr/share/ansible/plugins/callback:'
'/usr/share/ceph-ansible/plugins/callback:' '/usr/share/ceph-ansible/plugins/callback:'
'{}/callback_plugins:'
'{}/callback_plugins'.format( '{}/callback_plugins'.format(
constants.CLOUD_HOME_DIR, constants.CLOUD_HOME_DIR,
os.path.join(workdir, 'callback'), os.path.join(workdir, 'callback'),
os.path.join(cwd, 'callback'), os.path.join(cwd, 'callback'),
constants.DEFAULT_VALIDATIONS_BASEDIR, constants.DEFAULT_VALIDATIONS_BASEDIR
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR
) )
) )
env['ANSIBLE_ACTION_PLUGINS'] = os.path.expanduser( env['ANSIBLE_ACTION_PLUGINS'] = os.path.expanduser(
@ -531,13 +525,11 @@ def run_ansible_playbook(playbook, inventory, workdir, playbook_dir=None,
'/usr/share/ansible/tripleo-plugins/action:' '/usr/share/ansible/tripleo-plugins/action:'
'/usr/share/ansible/plugins/action:' '/usr/share/ansible/plugins/action:'
'/usr/share/ceph-ansible/plugins/actions:' '/usr/share/ceph-ansible/plugins/actions:'
'{}/action_plugins:'
'{}/action_plugins'.format( '{}/action_plugins'.format(
constants.CLOUD_HOME_DIR, constants.CLOUD_HOME_DIR,
os.path.join(workdir, 'action'), os.path.join(workdir, 'action'),
os.path.join(cwd, 'action'), os.path.join(cwd, 'action'),
constants.DEFAULT_VALIDATIONS_BASEDIR, constants.DEFAULT_VALIDATIONS_BASEDIR
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR
) )
) )
env['ANSIBLE_FILTER_PLUGINS'] = os.path.expanduser( env['ANSIBLE_FILTER_PLUGINS'] = os.path.expanduser(
@ -546,13 +538,11 @@ def run_ansible_playbook(playbook, inventory, workdir, playbook_dir=None,
'/usr/share/ansible/tripleo-plugins/filter:' '/usr/share/ansible/tripleo-plugins/filter:'
'/usr/share/ansible/plugins/filter:' '/usr/share/ansible/plugins/filter:'
'/usr/share/ceph-ansible/plugins/filter:' '/usr/share/ceph-ansible/plugins/filter:'
'{}/filter_plugins:'
'{}/filter_plugins'.format( '{}/filter_plugins'.format(
constants.CLOUD_HOME_DIR, constants.CLOUD_HOME_DIR,
os.path.join(workdir, 'filter'), os.path.join(workdir, 'filter'),
os.path.join(cwd, 'filter'), os.path.join(cwd, 'filter'),
constants.DEFAULT_VALIDATIONS_BASEDIR, constants.DEFAULT_VALIDATIONS_BASEDIR
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR
) )
) )
env['ANSIBLE_ROLES_PATH'] = os.path.expanduser( env['ANSIBLE_ROLES_PATH'] = os.path.expanduser(
@ -562,13 +552,11 @@ def run_ansible_playbook(playbook, inventory, workdir, playbook_dir=None,
'/usr/share/ansible/roles:' '/usr/share/ansible/roles:'
'/usr/share/ceph-ansible/roles:' '/usr/share/ceph-ansible/roles:'
'/etc/ansible/roles:' '/etc/ansible/roles:'
'{}/roles:'
'{}/roles'.format( '{}/roles'.format(
constants.CLOUD_HOME_DIR, constants.CLOUD_HOME_DIR,
os.path.join(workdir, 'roles'), os.path.join(workdir, 'roles'),
os.path.join(cwd, 'roles'), os.path.join(cwd, 'roles'),
constants.DEFAULT_VALIDATIONS_BASEDIR, constants.DEFAULT_VALIDATIONS_BASEDIR
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR
) )
) )
env['ANSIBLE_CALLBACK_WHITELIST'] = callback_whitelist env['ANSIBLE_CALLBACK_WHITELIST'] = callback_whitelist