User Tools

Site Tools


ansible:ansible_inventory

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ansible:ansible_inventory [2025/11/18 13:57]
manu
ansible:ansible_inventory [2025/11/18 14:14] (current)
manu
Line 4: Line 4:
 It is written in an INI or YAML format, lists host and groups. It is written in an INI or YAML format, lists host and groups.
 Can be static of dynamic. Can be static of dynamic.
 +
 +Convert a ini file to
 +  * JSON : <​code>​ansible-inventory -i /​etc/​ansible/​hosts --list</​code>​
 +  * YAML : <​code>​ansible-inventory -i /​etc/​ansible/​hosts --list --yaml</​code>​
 +
 +You can add **--vars** to add associated variable for each group/hosts
  
 Example of Collection of groups Dev:​children Example of Collection of groups Dev:​children
ansible/ansible_inventory.1763470650.txt.gz ยท Last modified: 2025/11/18 13:57 by manu