Permalink
Browse files

Use Ansible 2.4

This bumps the ansible version to 2.4, and ensures the user can
still override its group/host vars.

This also moves the group/host vars directly in the inventory
tree, to be closer to what the standard expectations of ansible
are.

Change-Id: Ic7d2fb7a777e74637699874ca8b15ecd18c3ea43
  • Loading branch information...
evrardjp committed Nov 24, 2017
1 parent 7b3aac2 commit ba6a3ed899de5f0b98386c20e736f61e58807c9b
Showing with 9 additions and 4 deletions.
  1. 0 { → playbooks/inventory}/group_vars/all/all.yml
  2. 0 { → playbooks/inventory}/group_vars/all/ceph.yml
  3. 0 { → playbooks/inventory}/group_vars/all/cinder.yml
  4. 0 { → playbooks/inventory}/group_vars/all/glance.yml
  5. 0 { → playbooks/inventory}/group_vars/all/infra.yml
  6. 0 { → playbooks/inventory}/group_vars/all/keystone.yml
  7. 0 { → playbooks/inventory}/group_vars/all/neutron.yml
  8. 0 { → playbooks/inventory}/group_vars/all/nova.yml
  9. 0 { → playbooks/inventory}/group_vars/all/octavia.yml
  10. 0 { → playbooks/inventory}/group_vars/all/pip.yml
  11. 0 { → playbooks/inventory}/group_vars/all/ssl.yml
  12. 0 { → playbooks/inventory}/group_vars/all_containers.yml
  13. 0 { → playbooks/inventory}/group_vars/aodh_all.yml
  14. 0 { → playbooks/inventory}/group_vars/barbican_all.yml
  15. 0 { → playbooks/inventory}/group_vars/ceilometer_all.yml
  16. 0 { → playbooks/inventory}/group_vars/ceph_all.yml
  17. 0 { → playbooks/inventory}/group_vars/cinder_all.yml
  18. 0 { → playbooks/inventory}/group_vars/cinder_volume.yml
  19. 0 { → playbooks/inventory}/group_vars/designate_all.yml
  20. 0 { → playbooks/inventory}/group_vars/galera_all.yml
  21. 0 { → playbooks/inventory}/group_vars/glance_all.yml
  22. 0 { → playbooks/inventory}/group_vars/gnocchi_all.yml
  23. 0 { → playbooks/inventory}/group_vars/haproxy_all/haproxy.yml
  24. 0 { → playbooks/inventory}/group_vars/haproxy_all/keepalived.yml
  25. 0 { → playbooks/inventory}/group_vars/heat_all.yml
  26. 0 { → playbooks/inventory}/group_vars/horizon_all.yml
  27. 0 { → playbooks/inventory}/group_vars/hosts.yml
  28. 0 { → playbooks/inventory}/group_vars/ironic-compute_hosts.yml
  29. 0 { → playbooks/inventory}/group_vars/ironic_all.yml
  30. 0 { → playbooks/inventory}/group_vars/ironic_compute.yml
  31. 0 { → playbooks/inventory}/group_vars/keystone_all.yml
  32. 0 { → playbooks/inventory}/group_vars/kvm-compute_hosts.yml
  33. 0 { → playbooks/inventory}/group_vars/lxd-compute_hosts.yml
  34. 0 { → playbooks/inventory}/group_vars/magnum_all.yml
  35. 0 { → playbooks/inventory}/group_vars/memcached.yml
  36. 0 { → playbooks/inventory}/group_vars/network_hosts.yml
  37. 0 { → playbooks/inventory}/group_vars/neutron_agent.yml
  38. 0 { → playbooks/inventory}/group_vars/neutron_all.yml
  39. 0 { → playbooks/inventory}/group_vars/neutron_calico_dhcp_agent.yml
  40. 0 { → playbooks/inventory}/group_vars/nova_all.yml
  41. 0 { → playbooks/inventory}/group_vars/octavia_all.yml
  42. 0 { → playbooks/inventory}/group_vars/powervm-compute_hosts.yml
  43. 0 { → playbooks/inventory}/group_vars/qemu-compute_hosts.yml
  44. 0 { → playbooks/inventory}/group_vars/rabbitmq_all.yml
  45. 0 { → playbooks/inventory}/group_vars/repo_all.yml
  46. 0 { → playbooks/inventory}/group_vars/rsyslog.yml
  47. 0 { → playbooks/inventory}/group_vars/sahara_all.yml
  48. 0 { → playbooks/inventory}/group_vars/swift_all.yml
  49. 0 { → playbooks/inventory}/group_vars/tacker_all.yml
  50. 0 { → playbooks/inventory}/group_vars/trove_all.yml
  51. 0 { → playbooks/inventory}/group_vars/utility_all.yml
  52. 0 { → playbooks/inventory}/host_vars/localhost/ceilometer.yml
  53. 0 { → playbooks/inventory}/host_vars/localhost/cinder.yml
  54. 0 { → playbooks/inventory}/host_vars/localhost/neutron.yml
  55. 0 { → playbooks/inventory}/host_vars/localhost/nova.yml
  56. 0 { → playbooks/inventory}/host_vars/localhost/swift.yml
  57. 0 host_vars/localhost.yml → playbooks/inventory/host_vars/localhost/unbound.yml
  58. +8 −3 scripts/bootstrap-ansible.sh
  59. +1 −1 scripts/openstack-ansible.rc
@@ -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

0 comments on commit ba6a3ed

Please sign in to comment.