From the course: Red Hat Certified Engineer (EX294) Cert Prep: 1 Foundations of Ansible

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Manage Ansible configuration files

Manage Ansible configuration files

From the course: Red Hat Certified Engineer (EX294) Cert Prep: 1 Foundations of Ansible

Start my 1-month free trial

Manage Ansible configuration files

- [Instructor] For most set ups, you will not need to change the Ansible configuration. However, it's good to know how Ansible's configured in case you need to change it in the future. Ansible supports several methods of configuring its behavior including the Ansible.cfg file, environmental variables, command line options, playbook keywords, and Ansible variables. The lowest priority configuration source is actually the Ansible.cfg file, but also probably the one we'll use the most. Ansible looks for the configuration file in the following order. It looks for a path to it in the Ansible config environment variable. Then it looks for the Ansible.cfg file in the current directory. Next, it looks for the Ansible.cfg file in the user's home directory. And lastly, it looks for the Ansible.cfg file in the /etc/Ansible directory. Once it finds the configuration, it parses it. Ansible variables set in playbooks override all…

Contents