namespace-config.py
: helps to create inventory directory with group variables that override Ansible Roles' defaults. The inventory directory then might be passed either to Ansible command line tools or molecule.
Used to create inventory directory with user specified values for group variables to use in Ansible roles.
The tool explores default values for each role it found and provides command line API to override them.
The tool creates directory with the structure acceptable for Ansible inventory
directories as declared in Working With Inventory. Also it adds an inventory file for
localhost
to make its specification explicit.
inventory-dir/
└── group_vars
| └── all
| ├── <role-name1>_config.yml
| ...
└── localhost.yml
So it is possible to place your inventory file(s) here (e.g. inventory-dir/hosts
)
and pass either the whole directory or an inventory file to Ansible command line tools.
Also you may pass the inventory-dir/group_vars
to molecule's provisioner
as a link as described here.
- Python 2
ANSIBLE_PROJECT_DIR
if defined used by the tool as a directory to search for roles. Otherwise (by default) the tool searches for roles in its parent directory.
Please refer to namespace-config.py --help
for the detailed information
regarding available arguments.