From 9ca06ea5e6245927167b5ec9a458664a0be9634e Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Wed, 3 Mar 2021 09:46:43 +0000 Subject: [PATCH] Disable fact variables This patch disables automatic generation of ansible_ variables which are duplicate of ansible_facts['var']. Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/860424 Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_neutron/+/860480 Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/866119 Change-Id: I7f39aa2c628761d5f56eea7eb8d05e715efd00e9 --- inventory/group_vars/all/nova.yml | 2 +- inventory/group_vars/repo_all.yml | 4 ++-- scripts/openstack-ansible.rc | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/inventory/group_vars/all/nova.yml b/inventory/group_vars/all/nova.yml index 619ae1d65c..6d7b09e6ff 100644 --- a/inventory/group_vars/all/nova.yml +++ b/inventory/group_vars/all/nova.yml @@ -33,6 +33,6 @@ nova_consoles: port: 0 path: "" -nova_console_type: "{{ (ansible_architecture == 'aarch64') | ternary('serialconsole', 'novnc') }}" +nova_console_type: "{{ (ansible_facts['architecture'] == 'aarch64') | ternary('serialconsole', 'novnc') }}" nova_console_port: "{{ nova_consoles[nova_console_type]['port'] }}" nova_console_path: "{{ nova_consoles[nova_console_type]['path'] }}" diff --git a/inventory/group_vars/repo_all.yml b/inventory/group_vars/repo_all.yml index 24c8e793db..731c80d75b 100644 --- a/inventory/group_vars/repo_all.yml +++ b/inventory/group_vars/repo_all.yml @@ -26,10 +26,10 @@ repo_container_bind_mounts: # Enable glusterfs mount repo_server_systemd_mounts: - - what: "{{ ansible_hostname }}:gfs-repo" + - what: "{{ ansible_facts['hostname'] }}:gfs-repo" where: "/var/www/repo" type: glusterfs state: 'started' enabled: true -openstack_repo_server_enable_glusterfs: True \ No newline at end of file +openstack_repo_server_enable_glusterfs: True diff --git a/scripts/openstack-ansible.rc b/scripts/openstack-ansible.rc index 60dd510a0c..5073ab5603 100644 --- a/scripts/openstack-ansible.rc +++ b/scripts/openstack-ansible.rc @@ -37,6 +37,7 @@ export ANSIBLE_GATHER_SUBSET="${ANSIBLE_GATHER_SUBSET:-!all,min}" export ANSIBLE_CACHE_PLUGIN="${ANSIBLE_CACHE_PLUGIN:-jsonfile}" export ANSIBLE_CACHE_PLUGIN_CONNECTION="${ANSIBLE_CACHE_PLUGIN_CONNECTION:-${OSA_CONFIG_DIR}/ansible_facts}" export ANSIBLE_CACHE_PLUGIN_TIMEOUT="${ANSIBLE_CACHE_PLUGIN_TIMEOUT:-86400}" +export ANSIBLE_INJECT_FACT_VARS="${ANSIBLE_INJECT_FACT_VARS:-False}" if [[ "${ANSIBLE_CACHE_PLUGIN}" == "memcached" ]];then if ! echo stats | nc -w 1 $(echo ${ANSIBLE_CACHE_PLUGIN_CONNECTION}|awk -F',' '{print $1}'|sed 's/:/ /') > /dev/null; then