From d501eadd94e88e68513ab2827f181ee91baa6aaf Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Thu, 26 May 2022 17:02:45 +0200 Subject: [PATCH] Align collection_file naming At the moment we're inconsistent in collection_file variable naming. While we're passing `collection_file` to the play, inside it we use `collections_file`. Closes-Bug: #1975723 Change-Id: Ia2814d6dc6faa509e98f7486fed12600e192ec8b --- scripts/bootstrap-ansible.sh | 1 + scripts/get-ansible-collection-requirements.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/bootstrap-ansible.sh b/scripts/bootstrap-ansible.sh index 3e2ee24aa0..528f92db11 100755 --- a/scripts/bootstrap-ansible.sh +++ b/scripts/bootstrap-ansible.sh @@ -54,6 +54,7 @@ export OSA_CLONE_DIR="$(pwd)" # Set the variable to the role file to be the absolute path ANSIBLE_ROLE_FILE="$(readlink -f "${ANSIBLE_ROLE_FILE}")" +ANSIBLE_COLLECTION_FILE="$(readlink -f "${ANSIBLE_COLLECTION_FILE}")" OSA_INVENTORY_PATH="$(readlink -f inventory)" OSA_ANSIBLE_PYTHON_INTERPRETER="auto" diff --git a/scripts/get-ansible-collection-requirements.yml b/scripts/get-ansible-collection-requirements.yml index 86fff5a206..afa1f5938c 100644 --- a/scripts/get-ansible-collection-requirements.yml +++ b/scripts/get-ansible-collection-requirements.yml @@ -97,8 +97,8 @@ state: absent vars: - collections_file: "{{ playbook_dir }}/../ansible-collection-requirements.yml" - required_collections: "{{ lookup('file', collections_file) | from_yaml }}" + collection_file: "{{ playbook_dir }}/../ansible-collection-requirements.yml" + required_collections: "{{ lookup('file', collection_file) | from_yaml }}" collection_path_default: '/etc/ansible/' user_collections: "{{ lookup('file', user_collections_path, errors='ignore')|default([], true) | from_yaml }}" user_collections_path: "{{ lookup('env', 'OSA_CONFIG_DIR') | default('/etc/openstack_deploy', true) ~ '/' ~ (user_collection_file|default('')) }}"