Ansible – Basic installation

Published on Author gryzli1 Comment

Here are the very basic steps of getting running copy of Ansible.

 

Clone ansible from Git:

 

Alternatively run ansible from the git cloned directory

If you don’t want to make a system wide ansible install, you could run it from the git cloned directory.

Here are the commands:

You could make sure you are using the alternative ansible by checking with “which”:

 

 

Create ansible config file

Ansible comes with some example config template here:

[ansible_source_dir]/examples/ansible.cfg

The preference for searching and loading config files is as follows (First is the highest precedence):

  • ANSIBLE_CONFIG                   – You can set this environment variable with a path to your desired ansible.cfg
    ..
  • $(cwd)/ansible.cfg                     – ansible.cfg in the current working directory
    ..
  • /home/$(whoami)/.ansible.cfg   – .ansible.cfg in our /home/$user directory
    ..
  • /etc/ansible/ansible.cfg             – system-wide ansible.cfg

One Response to Ansible – Basic installation

  1. On Cent7 now, you can easily get this via Epel.

    sudo yum install -y epel-release
    sudo yum update -y epel-release
    sudo yum install -y ansible

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha * Time limit is exhausted. Please reload CAPTCHA.