diff --git a/playbooks/ansible.cfg b/playbooks/ansible.cfg deleted file mode 100644 index 8f7198b6b6..0000000000 --- a/playbooks/ansible.cfg +++ /dev/null @@ -1,31 +0,0 @@ -[defaults] -# Set the role path -roles_path = /etc/ansible/roles:roles -retry_files_enabled = False - -# Additional plugins -lookup_plugins = /etc/ansible/roles/plugins/lookup -filter_plugins = /etc/ansible/roles/plugins/filter -action_plugins = /etc/ansible/roles/plugins/action - -library = /etc/ansible/roles/plugins/library - -# Fact caching -gathering = smart -gather_subset = !facter,!ohai -fact_caching = jsonfile -fact_caching_connection = /etc/openstack_deploy/ansible_facts -fact_caching_timeout = 86400 - -inventory = inventory -host_key_checking = False - -# Set color options -nocolor = 0 - -# SSH timeout -timeout = 6 -transport = ssh - -[ssh_connection] -pipelining = True diff --git a/playbooks/inventory/group_vars/all.yml b/playbooks/inventory/group_vars/all.yml index 269a59a62e..eb974a3068 100644 --- a/playbooks/inventory/group_vars/all.yml +++ b/playbooks/inventory/group_vars/all.yml @@ -244,8 +244,10 @@ openrc_region_name: "{{ service_region }}" # Docs: http://docs.openstack.org/developer/openstack-ansible-security/ apply_security_hardening: true +## Ansible ssh configuration ansible_ssh_extra_args: > -o UserKnownHostsFile=/dev/null + -o StrictHostKeyChecking=no -o ServerAliveInterval=64 -o ServerAliveCountMax=1024 -o Compression=no diff --git a/releasenotes/notes/remove-ansible.cfg-e65e4f17bc30cce7.yaml b/releasenotes/notes/remove-ansible.cfg-e65e4f17bc30cce7.yaml new file mode 100644 index 0000000000..35c5523340 --- /dev/null +++ b/releasenotes/notes/remove-ansible.cfg-e65e4f17bc30cce7.yaml @@ -0,0 +1,17 @@ +--- +features: + - Our general config options are now stored in an + "/usr/local/bin/openstack-ansible.rc" file and will + be sourced when the "openstack-ansible" wrapper is + invoked. The RC file will read in BASH environment + variables and should any Ansible option be set that + overlaps with our defaults the provided value will + be used. +other: + - The in tree "ansible.cfg" file in the playbooks + directory has been removed. This file was making + compatibility difficult for deployers who need to + change these values. Additionally this files very + existance forced Ansible to ignore any other config + file in either a users home directory or in the + default "/etc/ansible" directory. diff --git a/requirements.txt b/requirements.txt index 8497e0c7dd..aa0b739658 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,5 +11,6 @@ ndg-httpsclient>=0.4.2;python_version<'3.0' # BSD netaddr!=0.7.16,>=0.7.12 # BSD PrettyTable<0.8,>=0.7 # BSD pycrypto>=2.6 # Public Domain +python-memcached>=1.56 # PSF PyYAML>=3.1.0 # MIT virtualenv # MIT diff --git a/scripts/bootstrap-ansible.sh b/scripts/bootstrap-ansible.sh index 1e59dabdec..415f3f1334 100755 --- a/scripts/bootstrap-ansible.sh +++ b/scripts/bootstrap-ansible.sh @@ -53,7 +53,7 @@ case ${DISTRO_ID} in centos|rhel) yum check-update yum -y install git python2 curl autoconf gcc-c++ \ - python2-devel gcc libffi-devel openssl-devel python-requests \ + python2-devel gcc libffi-devel nc openssl-devel python-requests \ python-pyasn1 pyOpenSSL python-ndg_httpsclient \ python-netaddr python-prettytable python-crypto PyYAML \ python-virtualenv @@ -62,7 +62,7 @@ case ${DISTRO_ID} in apt-get update DEBIAN_FRONTEND=noninteractive apt-get -y install \ git python-all python-dev curl python2.7-dev build-essential \ - libssl-dev libffi-dev python-requests python-openssl python-pyasn1 \ + libssl-dev libffi-dev netcat python-requests python-openssl python-pyasn1 \ python-netaddr python-prettytable python-crypto python-yaml \ python-virtualenv ;; @@ -130,6 +130,11 @@ if [ -f "${ANSIBLE_ROLE_FILE}" ]; then fi fi +# Copy the OSA Ansible rc file into place +if [[ ! -f "/usr/local/bin/openstack-ansible.rc" ]]; then + cp scripts/openstack-ansible.rc /usr/local/bin/openstack-ansible.rc +fi + # Create openstack ansible wrapper tool cat > /usr/local/bin/openstack-ansible < /dev/null; then + export ANSIBLE_CACHE_PLUGIN="memory" + fi +fi + +export ANSIBLE_HOST_KEY_CHECKING="${ANSIBLE_HOST_KEY_CHECKING:-False}" +export ANSIBLE_TIMEOUT="${ANSIBLE_TIMEOUT:-5}" +export ANSIBLE_TRANSPORT="${ANSIBLE_TRANSPORT:-ssh}" +export ANSIBLE_SSH_PIPELINING="${ANSIBLE_SSH_PIPELINING:-True}"