Monday, August 13, 2018

ansible installation for 2.3.0

Ansible

Ansible

Ansible script is quite sensitive for version, we just want to install ansbile for version 2.3.0 in Ubuntu16.04.

apt-get install -y software-properties-common git python-pip python-dev libffi-dev libssl-dev
pip install 'ansible==2.3.0.0'

however, ansible is installed in /usr/local/bin/

/usr/local/bin/ansible --version
apt-get install sshpass
mkdir /etc/ansible

edit /etc/ansible/ansible.cfg

[defaults]


# uncomment this to disable SSH key host checking
host_key_checking = False


[persistent_connection]

# Configures the persistent connection timeout value in seconds.  This value is
# how long the persistent connection will remain idle before it is destroyed.
# If the connection doesn't receive a request before the timeout value
# expires, the connection is shutdown.  The default value is 30 seconds.
connect_timeout = 30

# Configures the persistent connection retries.  This value configures the
# number of attempts the ansible-connection will make when trying to connect
# to the local domain socket.  The default value is 30.
connect_retries = 30

# Configures the amount of time in seconds to wait between connection attempts
# to the local unix domain socket.  This value works in conjunction with the
# connect_retries value to define how long to try to connect to the local
# domain socket when setting up a persistent connection.  The default value is
# 1 second.
connect_interval = 1

Start to Deploy

/usr/local/bin/ansible-playbook -i hosts-single site.yml --skip-tags=testingonly -vvv

No comments:

Post a Comment