Browse Source

Merge "Remove references to tripleo-validations legacy directory"

changes/83/793383/9
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
40ddd739fa
2 changed files with 8 additions and 31 deletions
  1. +2
    -13
      tripleoclient/constants.py
  2. +6
    -18
      tripleoclient/utils.py

+ 2
- 13
tripleoclient/constants.py View File

@ -100,7 +100,6 @@ ENABLE_SSH_ADMIN_SSH_PORT_TIMEOUT = 600
ADDITIONAL_ARCHITECTURES = ['ppc64le']
DEFAULT_VALIDATIONS_BASEDIR = "/usr/share/ansible"
DEFAULT_VALIDATIONS_LEGACY_BASEDIR = "/usr/share/openstack-tripleo-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'
ANSIBLE_INVENTORY = os.path.join(DEFAULT_WORK_DIR,
'{}/', TRIPLEO_STATIC_INVENTORY)
ANSIBLE_VALIDATION_DIR = (
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"
)
ANSIBLE_VALIDATION_DIR = "/usr/share/ansible/validation-playbooks"
# NOTE(mwhahaha): So if we pip install tripleoclient, we need to also
# 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"
)
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')
)
VALIDATION_GROUPS_INFO = "{}/groups.yaml".format(DEFAULT_VALIDATIONS_BASEDIR)
# ctlplane network defaults
CTLPLANE_NET_NAME = 'ctlplane'


+ 6
- 18
tripleoclient/utils.py View File

@ -486,13 +486,11 @@ def run_ansible_playbook(playbook, inventory, workdir, playbook_dir=None,
'/usr/share/ansible/plugins/modules:'
'/usr/share/ceph-ansible/library:'
'/usr/share/ansible-modules:'
'{}/library:'
'{}/library'.format(
constants.CLOUD_HOME_DIR,
os.path.join(workdir, 'modules'),
os.path.join(cwd, 'modules'),
constants.DEFAULT_VALIDATIONS_BASEDIR,
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR
constants.DEFAULT_VALIDATIONS_BASEDIR
)
)
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/plugins/lookup:'
'/usr/share/ceph-ansible/plugins/lookup:'
'{}/lookup_plugins:'
'{}/lookup_plugins'.format(
constants.CLOUD_HOME_DIR,
os.path.join(workdir, 'lookup'),
os.path.join(cwd, 'lookup'),
constants.DEFAULT_VALIDATIONS_BASEDIR,
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR
constants.DEFAULT_VALIDATIONS_BASEDIR
)
)
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/plugins/callback:'
'/usr/share/ceph-ansible/plugins/callback:'
'{}/callback_plugins:'
'{}/callback_plugins'.format(
constants.CLOUD_HOME_DIR,
os.path.join(workdir, 'callback'),
os.path.join(cwd, 'callback'),
constants.DEFAULT_VALIDATIONS_BASEDIR,
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR
constants.DEFAULT_VALIDATIONS_BASEDIR
)
)
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/plugins/action:'
'/usr/share/ceph-ansible/plugins/actions:'
'{}/action_plugins:'
'{}/action_plugins'.format(
constants.CLOUD_HOME_DIR,
os.path.join(workdir, 'action'),
os.path.join(cwd, 'action'),
constants.DEFAULT_VALIDATIONS_BASEDIR,
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR
constants.DEFAULT_VALIDATIONS_BASEDIR
)
)
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/plugins/filter:'
'/usr/share/ceph-ansible/plugins/filter:'
'{}/filter_plugins:'
'{}/filter_plugins'.format(
constants.CLOUD_HOME_DIR,
os.path.join(workdir, 'filter'),
os.path.join(cwd, 'filter'),
constants.DEFAULT_VALIDATIONS_BASEDIR,
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR
constants.DEFAULT_VALIDATIONS_BASEDIR
)
)
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/ceph-ansible/roles:'
'/etc/ansible/roles:'
'{}/roles:'
'{}/roles'.format(
constants.CLOUD_HOME_DIR,
os.path.join(workdir, 'roles'),
os.path.join(cwd, 'roles'),
constants.DEFAULT_VALIDATIONS_BASEDIR,
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR
constants.DEFAULT_VALIDATIONS_BASEDIR
)
)
env['ANSIBLE_CALLBACK_WHITELIST'] = callback_whitelist


Loading…
Cancel
Save