Merge "Use Ansible 2.4"
This commit is contained in:
commit
de3f7b59fe
@ -22,7 +22,7 @@ set -e -u -x
|
||||
## Vars ----------------------------------------------------------------------
|
||||
export HTTP_PROXY=${HTTP_PROXY:-""}
|
||||
export HTTPS_PROXY=${HTTPS_PROXY:-""}
|
||||
export ANSIBLE_PACKAGE=${ANSIBLE_PACKAGE:-"ansible==2.3.2.0"}
|
||||
export ANSIBLE_PACKAGE=${ANSIBLE_PACKAGE:-"ansible==2.4.2.0"}
|
||||
export ANSIBLE_ROLE_FILE=${ANSIBLE_ROLE_FILE:-"ansible-role-requirements.yml"}
|
||||
export SSH_DIR=${SSH_DIR:-"/root/.ssh"}
|
||||
export DEBIAN_FRONTEND=${DEBIAN_FRONTEND:-"noninteractive"}
|
||||
@ -194,8 +194,6 @@ popd
|
||||
# Write the OSA Ansible rc file
|
||||
sed "s|OSA_INVENTORY_PATH|${OSA_INVENTORY_PATH}|g" scripts/openstack-ansible.rc > /usr/local/bin/openstack-ansible.rc
|
||||
sed -i "s|OSA_PLAYBOOK_PATH|${OSA_PLAYBOOK_PATH}|g" /usr/local/bin/openstack-ansible.rc
|
||||
sed -i "s|OSA_GROUP_VARS_DIR|${OSA_CLONE_DIR}/group_vars/|g" /usr/local/bin/openstack-ansible.rc
|
||||
sed -i "s|OSA_HOST_VARS_DIR|${OSA_CLONE_DIR}/host_vars/|g" /usr/local/bin/openstack-ansible.rc
|
||||
|
||||
|
||||
# Create openstack ansible wrapper tool
|
||||
@ -238,6 +236,13 @@ if [[ "\${PWD}" == *"${OSA_CLONE_DIR}"* ]] || [ "\${RUN_CMD}" == "openstack-ansi
|
||||
# Source the Ansible configuration.
|
||||
. /usr/local/bin/openstack-ansible.rc
|
||||
|
||||
# Load userspace group vars
|
||||
if [[ -d /etc/openstack_deploy/group_vars || -d /etc/openstack_deploy/host_vars ]]; then
|
||||
if [[ ! -f /etc/openstack_deploy/inventory.ini ]]; then
|
||||
echo '[all]' > /etc/openstack_deploy/inventory.ini
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check whether there are any user configuration files
|
||||
if ls -1 /etc/openstack_deploy/user_*.yml &> /dev/null; then
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
export ANSIBLE_RETRY_FILES_ENABLED="${ANSIBLE_RETRY_FILES_ENABLED:-False}"
|
||||
|
||||
export ANSIBLE_INVENTORY="${ANSIBLE_INVENTORY:-OSA_INVENTORY_PATH}"
|
||||
export ANSIBLE_INVENTORY="${ANSIBLE_INVENTORY:-OSA_INVENTORY_PATH/dynamic_inventory.py,/etc/openstack_deploy/inventory.ini}"
|
||||
|
||||
export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_PATH:-/openstack/log/ansible-logging/ansible.log}"
|
||||
mkdir -p "$(dirname ${ANSIBLE_LOG_PATH})" || unset ANSIBLE_LOG_PATH
|
||||
|
Loading…
Reference in New Issue
Block a user