Tuesday, April 16, 2019

Manually adding ansible_host inventory file, if NOT present.

In computing, Ansible is an open-source software provisioning, configuration management, and application deployment tool. It runs on many Unix-like systems, and can configure both Unix-like systems as well as Microsoft Windows. 

If you are installing ansible using pip or any other manual process, first check if "ansible" directory is present inside "/etc" 

if not, here is the steps you can follow to add ansible_host inventory file. This inventory file mainly keeps the inventory of detail information regarding all the host machines. 

Steps: 

1>  Open Terminal in the linux system and enter following commands
2>  cd /etc
3>  mkdir -p ansible/host/
4>  cd ansible/host/
5>  vim ansible_host
6> Add host details in following format
 [host group name]
<host IP> [ansible_port=<port number>] [ansible_user=<username>] [ansible_ssh_pass=<password>]
e.g.
[localvms]
172.17.12.65 ansible_user=guestuser1 ansible_ssh_pass=123
172.17.12.80 ansible_port=808 ansible_user=
guestuser1 ansible_ssh_pass=123

Click here for more information from official source.


No comments:

Post a Comment