cancel
Showing results for 
Search instead for 
Did you mean: 
DeepakRamanath
Flight Engineer
Flight Engineer
  • 915 Views

Location of .ansible-navigator.yml

Jump to solution

Hi All,

I'm currently in Chapter 2.5 and so far in all the labs I have see that .ansible-navigator.yml file's location is home directory. Any particular reason? Why can't this be along side ansible.cfg in the same directory?

2 Solutions

Accepted Solutions
Trevor
Starfighter Starfighter
Starfighter
  • 890 Views

It's this kind of curiosity that will serve to advance your
knowledge beyond the norm!

The default location of the ansible.cfg file is /etc/ansible/.  
If this is where you want ansible to look for the .ansible-navigator.yml
file - no problem!!!   You are in complete and total control of where
Ansible looks for this file with the use of the following environment variable:

ANSIBLE_NAVIGATOR_CONFIG

I won't spoil your learning fun by providing you with the
information to populate this variable.  You're on your way!!!

 

 

Trevor "Red Hat Evangelist" Chandler

View solution in original post

Travis
Moderator
Moderator
  • 861 Views

@DeepakRamanath and @Trevor -

Trevor is correct on the default ansible.cfg file being in /etc/ansible, but that is part of Ansible core. This has no bearing on the new AAP and ansible-navigator command which uses and execution environment.

That being said, Trevor pointed out some important things like the environment variable ANSIBLE_NAVIGATOR_CONFIG. However, the defaults for this command looks at the home directory, and just like the ansible command, it also places a higher precedence on the ansible-navigator.yml located in the current working directory. 

Initially, the DO374 course was the first course introducing AAP and the ansible-navigator command, so we started with the defaults and didn't talk about the configuration files (yet), but instead focused on how things worked and some "Best Practices" for Ansible development (git, directory structure, working with groups, and even a little bit of Ansible Automation Controller). In Chapter 4, we focus on both the ansible.cfg file configuration and ansible-navigator.yml configuration file and how it works as well as defining the order of precedence. The intent was to introduce things in small pieces to develop understanding and how to tweak settings and manage configuration after learning the basics.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training

View solution in original post

5 Replies
Trevor
Starfighter Starfighter
Starfighter
  • 891 Views

It's this kind of curiosity that will serve to advance your
knowledge beyond the norm!

The default location of the ansible.cfg file is /etc/ansible/.  
If this is where you want ansible to look for the .ansible-navigator.yml
file - no problem!!!   You are in complete and total control of where
Ansible looks for this file with the use of the following environment variable:

ANSIBLE_NAVIGATOR_CONFIG

I won't spoil your learning fun by providing you with the
information to populate this variable.  You're on your way!!!

 

 

Trevor "Red Hat Evangelist" Chandler
Travis
Moderator
Moderator
  • 862 Views

@DeepakRamanath and @Trevor -

Trevor is correct on the default ansible.cfg file being in /etc/ansible, but that is part of Ansible core. This has no bearing on the new AAP and ansible-navigator command which uses and execution environment.

That being said, Trevor pointed out some important things like the environment variable ANSIBLE_NAVIGATOR_CONFIG. However, the defaults for this command looks at the home directory, and just like the ansible command, it also places a higher precedence on the ansible-navigator.yml located in the current working directory. 

Initially, the DO374 course was the first course introducing AAP and the ansible-navigator command, so we started with the defaults and didn't talk about the configuration files (yet), but instead focused on how things worked and some "Best Practices" for Ansible development (git, directory structure, working with groups, and even a little bit of Ansible Automation Controller). In Chapter 4, we focus on both the ansible.cfg file configuration and ansible-navigator.yml configuration file and how it works as well as defining the order of precedence. The intent was to introduce things in small pieces to develop understanding and how to tweak settings and manage configuration after learning the basics.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
DeepakRamanath
Flight Engineer
Flight Engineer
  • 736 Views

Thank you @Trevor and @Travis for your excellent responses. This will allow me to better understand.

0 Kudos
Trevor
Starfighter Starfighter
Starfighter
  • 661 Views

Thank you for the question Deepak.  Keep them coming!!!!

Trevor "Red Hat Evangelist" Chandler
0 Kudos
Trevor
Starfighter Starfighter
Starfighter
  • 851 Views

My job, as the leadoff hitter is to get on base.  Your job Travis, batting cleanup, is to advance me on the base path.  As usual, you not only advanced around the diamond, but you got me across home plate!!!  You do know that the person batting cleanup is the more accomplished hitter, right

Thanks Travis for what you always do - elevate the discussion!!!

 

 

 

Trevor "Red Hat Evangelist" Chandler
Join the discussion
You must log in to join this conversation.