EVE-NG Linux VM SSH troubleshooting
September 20, 2025
Ansible configuration
Ansible typically works out-of-the-box without requiring additional configuration. However, advanced usage might necessitate some customizat
Ansible typically works out-of-the-box without requiring additional configuration. However, advanced usage might necessitate some customization. Ansible can be configured through files or variables.
For example, the DEFAULT_HOST_LIST parameter defines the inventory file. The official documentation specifies:
- Default: The default value if not specified otherwise (/etc/ansible/hosts).
- INI: How to specify the parameter in an INI configuration file (in this case, the section is [defaults] and the parameter is inventory).
- Environment: The environment variable name to specify this parameter (ANSIBLE_INVENTORY).
If you choose to configure Ansible via INI files, you have four options:
- Use the file at /etc/ansible/ansible.cfg
- Use the file ~/.ansible.cfg in the home directory
- Use the file ./ansible.cfg in the current directory
- Use the file defined by the ANSIBLE_CONFIG environment variable
The DEFAULT_HOST_LIST parameter can also be specified on the command line with -i. Additionally, some parameters can be defined within a playbook.
Ansible uses a precedence to determine which parameter value to use if it is specified multiple times. The order is:
- Configuration settings
- Command-line options
- Playbook keywords
- Variables
Lower items in the list override higher ones.
There are handy utilities to get general and specific information about your environment:
- ansible-config list: Lists all possible variables and how to configure them.
- ansible-config dump: Prints current values for each variable.
- ansible-config init > ansible.cfg: Creates a sample configuration file, comprehensive but complex.
- ansible-config view: Verifies and prints the current configuration.
Continue reading the post on Patreon .