Merge "Update ansible to version 2.1"
This commit is contained in:
commit
7fd92eaa1c
@ -95,7 +95,6 @@
|
||||
src: https://git.openstack.org/openstack/openstack-ansible-os_tempest
|
||||
version: master
|
||||
- name: plugins
|
||||
path: /etc/ansible
|
||||
scm: git
|
||||
src: https://git.openstack.org/openstack/openstack-ansible-plugins
|
||||
version: master
|
||||
|
@ -1,9 +1,16 @@
|
||||
[defaults]
|
||||
# Set the role path
|
||||
roles_path = /etc/ansible/roles:roles
|
||||
|
||||
# Additional plugins
|
||||
lookup_plugins = /etc/ansible/plugins/lookup
|
||||
filter_plugins = /etc/ansible/plugins/filter
|
||||
action_plugins = /etc/ansible/plugins/action
|
||||
library = /etc/ansible/plugins/library
|
||||
lookup_plugins = /etc/ansible/roles/plugins/lookup
|
||||
filter_plugins = /etc/ansible/roles/plugins/filter
|
||||
action_plugins = /etc/ansible/roles/plugins/action
|
||||
callback_plugins = /etc/ansible/roles/plugins/callback
|
||||
|
||||
callback_whitelist = ''
|
||||
|
||||
library = /etc/ansible/roles/plugins/library
|
||||
|
||||
# Fact caching
|
||||
gathering = smart
|
||||
|
@ -25,7 +25,7 @@ export BOOTSTRAP_OPTS=${BOOTSTRAP_OPTS:-''}
|
||||
|
||||
# Run AIO bootstrap playbook
|
||||
pushd tests
|
||||
ansible-playbook -i "localhost ansible-connection=local," \
|
||||
ansible-playbook -i test-inventory.ini \
|
||||
-e "${BOOTSTRAP_OPTS}" \
|
||||
bootstrap-aio.yml
|
||||
popd
|
||||
|
@ -22,7 +22,7 @@ set -e -u -x
|
||||
## Vars ----------------------------------------------------------------------
|
||||
export HTTP_PROXY=${HTTP_PROXY:-""}
|
||||
export HTTPS_PROXY=${HTTPS_PROXY:-""}
|
||||
export ANSIBLE_GIT_RELEASE=${ANSIBLE_GIT_RELEASE:-"v1.9.4-1"}
|
||||
export ANSIBLE_GIT_RELEASE=${ANSIBLE_GIT_RELEASE:-"v2.1.0.0-1"}
|
||||
export ANSIBLE_GIT_REPO=${ANSIBLE_GIT_REPO:-"https://github.com/ansible/ansible"}
|
||||
export ANSIBLE_ROLE_FILE=${ANSIBLE_ROLE_FILE:-"ansible-role-requirements.yml"}
|
||||
export ANSIBLE_WORKING_DIR=${ANSIBLE_WORKING_DIR:-/opt/ansible_${ANSIBLE_GIT_RELEASE}}
|
||||
@ -103,6 +103,9 @@ pushd /usr/local/bin
|
||||
find /opt/ansible-runtime/bin/ -name 'ansible*' -exec ln -sf {} \;
|
||||
popd
|
||||
|
||||
# If the Ansible plugins are in the old location remove them.
|
||||
[[ -d "/etc/ansible/plugins" ]] && rm -rf "/etc/ansible/plugins"
|
||||
|
||||
# Update dependent roles
|
||||
if [ -f "${ANSIBLE_ROLE_FILE}" ]; then
|
||||
if [[ "${ANSIBLE_ROLE_FETCH_MODE}" == 'galaxy' ]];then
|
||||
|
@ -81,7 +81,7 @@ fi
|
||||
# Bootstrap an AIO
|
||||
pushd $(dirname ${0})/../tests
|
||||
sed -i '/\[defaults\]/a nocolor = 1/' ansible.cfg
|
||||
ansible-playbook -i "localhost ansible-connection=local," \
|
||||
ansible-playbook -i test-inventory.ini \
|
||||
-e "${BOOTSTRAP_OPTS}" \
|
||||
${ANSIBLE_PARAMETERS} \
|
||||
bootstrap-aio.yml
|
||||
@ -101,11 +101,8 @@ pushd $(dirname ${0})/../playbooks
|
||||
mkdir -p /openstack/log/ansible-logging
|
||||
sed -i '/\[defaults\]/a log_path = /openstack/log/ansible-logging/ansible.log' ansible.cfg
|
||||
|
||||
# This plugin makes the output easier to read
|
||||
wget -O /etc/ansible/plugins/callback/human_log.py https://gist.githubusercontent.com/cliffano/9868180/raw/f360f306b3c6d689734a6aa8773a00edf16a0054/human_log.py
|
||||
|
||||
# Enable callback plugins
|
||||
sed -i '/\[defaults\]/a callback_plugins = /etc/ansible/plugins/callback' ansible.cfg
|
||||
sed -i 's/^callback_whitelist.*/callback_whitelist = "profile_tasks"/g' ansible.cfg
|
||||
popd
|
||||
|
||||
# Log some data about the instance and the rest of the system
|
||||
|
@ -48,7 +48,9 @@ pushd "playbooks"
|
||||
# NOTE(mattt): We have to skip V-38462 as openstack-infra are now building
|
||||
# images with apt config Apt::Get::AllowUnauthenticated set
|
||||
# to true.
|
||||
install_bits --skip-tag V-38462 security-hardening.yml
|
||||
# NOTE(cloudnull): We have to skip V-38496,V-38670 as openstack-infra are now building
|
||||
# images with open users resulting in "System accounts are unlocked"
|
||||
install_bits --skip-tag "V-38462,V-38496,V-38670" security-hardening.yml
|
||||
|
||||
# Bring the lxc bridge down and back up to ensures the iptables rules are in-place
|
||||
# This also will ensure that the lxc dnsmasq rules are active.
|
||||
|
@ -1,10 +1,13 @@
|
||||
[defaults]
|
||||
# Set the role path
|
||||
roles_path = /etc/ansible/roles:roles
|
||||
|
||||
# Additional plugins
|
||||
action_plugins = /etc/ansible/plugins/action
|
||||
callback_plugins = /etc/ansible/plugins/callback
|
||||
filter_plugins = /etc/ansible/plugins/filter
|
||||
lookup_plugins = /etc/ansible/plugins/lookup
|
||||
library = /etc/ansible/plugins/library
|
||||
action_plugins = /etc/ansible/roles/plugins/action
|
||||
callback_plugins = /etc/ansible/roles/plugins/callback
|
||||
filter_plugins = /etc/ansible/roles/plugins/filter
|
||||
lookup_plugins = /etc/ansible/roles/plugins/lookup
|
||||
library = /etc/ansible/roles/plugins/library
|
||||
|
||||
# Set color options
|
||||
nocolor = 0
|
||||
|
1
tests/test-inventory.ini
Normal file
1
tests/test-inventory.ini
Normal file
@ -0,0 +1 @@
|
||||
localhost ansible_connection=local
|
Loading…
Reference in New Issue
Block a user