Browse Source

Remove references to tripleo-validations legacy directory

'/usr/share/openstack-tripleo-validations' doesn't exist anymore since
Train. Tripleo-validations installs its bits in '/usr/share/ansible/'.
It is now quite safe to remove the references to this legacy directory.

**Note**
This patch will be applied to master and stable/wallaby only. This logic
will be kept as is for stable/train like this directory may still be
present during an upgrade.

Change-Id: Ib96e2c0dd789be2be6bdaf66682b985cb864baf8
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
(cherry picked from commit 755cc6095d)
changes/33/795033/1
Gael Chamoulaud (Strider) 2 weeks ago
committed by Gael Chamoulaud
parent
commit
7ba767305d
2 changed files with 8 additions and 23 deletions
  1. +0
    -1
      tripleo_common/constants.py
  2. +8
    -22
      tripleo_common/utils/ansible.py

+ 0
- 1
tripleo_common/constants.py View File

@ -58,7 +58,6 @@ DEFAULT_TEMPLATES_PATH = '/usr/share/openstack-tripleo-heat-templates/'
#: The path to the base directory of tripleo-validations
DEFAULT_VALIDATIONS_BASEDIR = "/usr/share/ansible"
DEFAULT_VALIDATIONS_LEGACY_BASEDIR = "/usr/share/openstack-tripleo-validations"
# The path to the tripleo validations installed on the undercloud
DEFAULT_VALIDATIONS_PATH = "{}/validation-playbooks/".format(


+ 8
- 22
tripleo_common/utils/ansible.py View File

@ -47,25 +47,20 @@ def write_default_ansible_cfg(work_dir,
'/usr/share/ansible/tripleo-plugins/modules:'
'/usr/share/ansible/plugins/modules:'
'/usr/share/ansible-modules:'
'{}/library:'
'{}/library'.format(constants.DEFAULT_VALIDATIONS_BASEDIR,
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR))
'{}/library'.format(
constants.DEFAULT_VALIDATIONS_BASEDIR))
lookups_path = (
'/root/.ansible/plugins/lookup:'
'/usr/share/ansible/tripleo-plugins/lookup:'
'/usr/share/ansible/plugins/lookup:'
'{}/lookup_plugins:'
'{}/lookup_plugins'.format(
constants.DEFAULT_VALIDATIONS_BASEDIR,
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR))
constants.DEFAULT_VALIDATIONS_BASEDIR))
callbacks_path = (
'~/.ansible/plugins/callback:'
'/usr/share/ansible/tripleo-plugins/callback:'
'/usr/share/ansible/plugins/callback:'
'{}/callback_plugins:'
'{}/callback_plugins'.format(
constants.DEFAULT_VALIDATIONS_BASEDIR,
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR))
constants.DEFAULT_VALIDATIONS_BASEDIR))
callbacks_whitelist = ','.join(['tripleo_dense', 'tripleo_profile_tasks',
'tripleo_states'])
@ -73,29 +68,20 @@ def write_default_ansible_cfg(work_dir,
'~/.ansible/plugins/action:'
'/usr/share/ansible/plugins/action:'
'/usr/share/ansible/tripleo-plugins/action:'
'{}/action_plugins:'
'{}/action_plugins'.format(
constants.DEFAULT_VALIDATIONS_BASEDIR,
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR))
constants.DEFAULT_VALIDATIONS_BASEDIR))
filter_plugins_path = (
'~/.ansible/plugins/filter:'
'/usr/share/ansible/plugins/filter:'
'/usr/share/ansible/tripleo-plugins/filter:'
'{}/filter_plugins:'
'{}/filter_plugins'.format(
constants.DEFAULT_VALIDATIONS_BASEDIR,
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR))
roles_path = ('%(work_dir)s/roles:'
constants.DEFAULT_VALIDATIONS_BASEDIR))
roles_path = ('{work_dir!s}/roles:'
'/root/.ansible/roles:'
'/usr/share/ansible/tripleo-roles:'
'/usr/share/ansible/roles:'
'/etc/ansible/roles:'
'%(ooo_val_path)s/roles:'
'%(work_dir)s' % {
'work_dir': work_dir,
'ooo_val_path':
constants.DEFAULT_VALIDATIONS_LEGACY_BASEDIR
})
'{work_dir!s}'.format(work_dir=work_dir))
config = configparser.ConfigParser()
config.read(ansible_config_path)


Loading…
Cancel
Save