while doing practice getting the below error in the .yaml file. please let me know what I'm doing wrong.
Below is the inventory file.
The yml file was checked on the internet and showed no error.
Regards, Saahil
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/
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.
Hi @shashi01 ,
As you said the same output is getting from the below command.
[redhat@server ~]$ ansible-navigator run ansible-navigator.yml
[redhat@server ~]$
Regards,
@Ksahil Refer here and correct the indentation of your yaml : https://ansible.readthedocs.io/projects/navigator/settings/#the-ansible-navigator-settings-file
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/
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
@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.”
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!
@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...
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.