top of page

Ansible Configuration File Priority (Precedence)

In Ansible, configuration files have a specific priority order, which determines which configuration settings take precedence when multiple configuration files are present.


​Environment Variables



Current Directory



​User's Home Directory



Default Configuration File


(P0) Environment Variables: Ansible can be influenced by environment variables like ANSIBLE_CONFIG, which can be set to point to a specific configuration file, and these settings will take precedence over the default configuration file. (P1) Current Directory: If you have a local configuration file in your project directory (by default, named ansible.cfg), it will take precedence over global configuration files.

(P2) User's Home Directory: The user-level configuration file located at ~/.ansible.cfg can be used to define user-specific configuration options.

(P3) Default Configuration File: If no configuration settings are found in any of the above files, Ansible uses built-in defaults.


Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page