Ansible Inventory Management: From Basics to Advanced Usage (Part 4)

Ansible Inventory Management: From Basics to Advanced Usage (Part 4)

Ansible Inventory The inventory is used to define which hosts are managed by Ansible. The inventory supports the following formats: • IP addresses • Hostnames • Ranges (<span>server[b:c]</span>) • Host groups (<span>webserver</span>) • Subgroups (<span>lnmp:children</span>) Inventory 172.25.250.10 [webserver] server[b:c] [mysql] 172.25.250.1[3:4] [lnmp:children] webserver mysql • Directly defining a hostname or address, currently <span>172.25.250.10</span> does not … Read more

Ansible Configuration File: From Basics to Advanced

Ansible Configuration File: From Basics to Advanced

Ansible Configuration File Ansible looks for a file named <span>ansible.cfg</span> as its configuration file. [root@ansible ansible]# ansible –version ansible [core 2.16.3] config file = /root/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.12/site-packages/ansible_core-2.16.3-py3.12.egg/ansible ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 3.12.8 (main, Dec 12 2024, … Read more