Quantcast
Channel: How To – Paul K Leasure
Viewing all articles
Browse latest Browse all 39

How to (where to) Create an Ansible Configure File

$
0
0

Ansible Configuration File

As a default, Ansible expects to find files in a certain place. Some of these files may not suit your needs. To configure ansible to better suit your needs, use the ansible configuration file.

There are at least 2 ways to do this.
You can create a global configuration file by creating it in your home folder like this:

touch ~/.ansible.cfg

eg.

[defaults] 
inventory = ~/Path/To/ansible/hosts

Or, you can add an Ansible Configuration File to the root of your projects. That way you may have, for example, a hosts file relative to the root of a project.

eg.

[defaults] 
inventory = hosts


Viewing all articles
Browse latest Browse all 39

Trending Articles