cancel
Showing results for 
Search instead for 
Did you mean: 
spurs
Flight Engineer
Flight Engineer
  • 352 Views

ansible.cfg on the exam

Jump to solution

Hello!

I've been practising creating ansible.cfg file myself.

Today, I saw another solution that using cat /etc/ansible/ansible.cfg, then ansible-config init --disabled >> ansible.cfg (basically copy from /etc/ansible/ansible.cfg).

Is it(the method above) also possible to configure my ansible.cfg?

Honestly, I'm more familiar with creating ansible.cfg and put [defaults], [privilege_escalation].

What's the recommended way on the exam? 

One more question is, will I be provided explicit information to create ansible.cfg? Such as, become should be true and become user should be ~~ ask become password automatically or not ~~ stuff like that.

Labels (1)
1 Solution

Accepted Solutions
Chetan_Tiwary_
Moderator
Moderator
  • 292 Views

@spurs To generate an example config file ( fully commented out )  you can use : 

ansible-config init --disabled > ansible.cfg

Refer here : https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-configuration-setti... 

However, I will recommend to use the other one which you are already aware of. Please note that there is no official recommendation from the exam team or exam support or course side - You are free to use any method at your disposal ( read as "provided in the exam environment" ).

Do not worry about the parameters used in the  ansible.cfg as it will and it should be explicitly mentioned in the tasks - Please read the task details / scenario carefully to understand what you should include or not in the ansible.cfg file. 

View solution in original post

3 Replies
Chetan_Tiwary_
Moderator
Moderator
  • 293 Views

@spurs To generate an example config file ( fully commented out )  you can use : 

ansible-config init --disabled > ansible.cfg

Refer here : https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-configuration-setti... 

However, I will recommend to use the other one which you are already aware of. Please note that there is no official recommendation from the exam team or exam support or course side - You are free to use any method at your disposal ( read as "provided in the exam environment" ).

Do not worry about the parameters used in the  ansible.cfg as it will and it should be explicitly mentioned in the tasks - Please read the task details / scenario carefully to understand what you should include or not in the ansible.cfg file. 

spurs
Flight Engineer
Flight Engineer
  • 268 Views

Thank you so mcuh, I was a bit worried if I would miss some directives in ansible.cfg

Chetan_Tiwary_
Moderator
Moderator
  • 248 Views

Pleasure ! Dont worry - all the best !

Join the discussion
You must log in to join this conversation.