Talk:Ansible: Difference between revisions

From Network Security Wiki
Content added Content deleted
No edit summary
Line 3: Line 3:
* 1000+ Modules available.
* 1000+ Modules available.
* Modules written in python.
* Modules written in python.

= Running Ansible =
* Do not use Root account for ansible
* Create a account with all privileges.

sudo visudo
%ansible ALL=(ALL) ALL
usermod -aG ansible aman

yum install -y python2 epel-release


= Inventory file =
= Inventory file =

Revision as of 16:44, 17 July 2019

Features of Ansible

  • Ansible is Modular
  • 1000+ Modules available.
  • Modules written in python.

Running Ansible

  • Do not use Root account for ansible
  • Create a account with all privileges.
sudo visudo
%ansible ALL=(ALL)    ALL

usermod -aG ansible aman
yum install -y python2 epel-release

Inventory file

cd install
nano inventory
[all]
controller.example.com
node1.example.com
[servers]
node1.example.com
server1.example.com
ansible all -i inventory --list-hosts

Ansible Config File

/etc/ansible/ansible.cfg
~/.ansible.cfg
ansible.cfg in project directory