cancel
Showing results for 
Search instead for 
Did you mean: 
Ksahil
Flight Engineer
Flight Engineer
  • 2,472 Views

Ansiable file configration

Jump to solution

while doing practice getting the below error in the .yaml file. please let me know what I'm doing wrong.

Ksahil_1-1721886899435.png

Below is the inventory file.

Ksahil_1-1721885349676.png

The yml file was checked on the internet and showed no error.

Ksahil_0-1721886870281.png

 

Regards, Saahil

 

 

 

Labels (2)
1 Solution

Accepted Solutions
ragrawal
Flight Engineer Flight Engineer
Flight Engineer
  • 1,767 Views

Hello @Ksahil 

ansible-navigator.yml is the configuration file for Ansible Navigator. It controls the behaviour of the Ansible Navigator CLI Tool. 

"ansible-navigator run" expects you to pass a playbook to run. You are trying to run the configuration file itself, which cannot work.

Additionally, it looks like your ansible-navigator.yml config file is also wrong. Please check the below link to rectify 

https://ansible.readthedocs.io/projects/navigator/settings/

Rajat Agrawal

View solution in original post

10 Replies
shashi01
Moderator
Moderator
  • 1,813 Views

Hi @Ksahil 

I think the error occurs because ansible-navigator.yml is a configuration file for ansible-navigator, not a playbook. Use ansible-navigator run <playbook._name.yml> to run a playbook, not ansible-playbook ansible-navigator.yml.

Ksahil
Flight Engineer
Flight Engineer
  • 1,790 Views

Hi @shashi01 ,

As you said the same output is getting from the below command.

[redhat@server ~]$ ansible-navigator run ansible-navigator.yml
[redhat@server ~]$

Ksahil_0-1721931765661.png

Regards,

Chetan_Tiwary_
Community Manager
Community Manager
  • 1,778 Views
Antonypdf1
Mission Specialist
Mission Specialist
  • 1,658 Views
Yml
0 Kudos
ragrawal
Flight Engineer Flight Engineer
Flight Engineer
  • 1,768 Views

Hello @Ksahil 

ansible-navigator.yml is the configuration file for Ansible Navigator. It controls the behaviour of the Ansible Navigator CLI Tool. 

"ansible-navigator run" expects you to pass a playbook to run. You are trying to run the configuration file itself, which cannot work.

Additionally, it looks like your ansible-navigator.yml config file is also wrong. Please check the below link to rectify 

https://ansible.readthedocs.io/projects/navigator/settings/

Rajat Agrawal
shashi01
Moderator
Moderator
  • 1,760 Views

@Ksahil 

As already mentioned, use ansible-navigator run playbook. Understand that ansible-navigator.yml configures the behavior of ansible-navigator and is not intended to be executed directly. Use it to customize your environment and then run actual playbooks with ansible-navigator, referencing this configuration file as needed.

@ragrawal Yes,  ansible-navigator.yml need to rectify

Ksahil
Flight Engineer
Flight Engineer
  • 1,740 Views

@shashi01 @ragrawal @Chetan_Tiwary_

Thank you, guys, for helping me.

Since I’m learning through self-study, sometimes it’s difficult to grasp certain concepts.”

shashi01
Moderator
Moderator
  • 1,732 Views

@Ksahil 

You're doing an amazing job with your self-study! Remember, every challenge is a chance to learn and grow. Keep going, and don't hesitate to ask for help when you need it. Stay positive and keep Learning!

Ksahil
Flight Engineer
Flight Engineer
  • 1,694 Views

@shashi01 Yes you are right, by the self-study, I cleared my RHCSA certification and I'm looking for a job... also started to learn Ansible to clear the RHCE.

By the way, thank you for your motivation it is always required... 

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