Your inventory seems to be configured literally as:

/Users/suneelkumar/Documents/Automation/Ansible/hosts
 #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml

Note that the # and everything after is still included as part of the path,
where I assume you meant it to be a comment.

Move the comment to its own line, and I would assume that it should start
working for you.

On Mon, May 10, 2021 at 10:45 AM Suneel Hegde <hegden...@gmail.com> wrote:

> Hello Team,
>
> I am trying to do ansible all --list-hosts -vvvvvvv and try to ping the
> hosts but getting this error could you please help me to solve this problem?
>
> suneelkumar@LT Ansible % ansible all --list-hosts -vvvvvvv
> ansible 2.10.4
>   config file = /Users/suneelkumar/Documents/Automation/Ansible/ansible.cfg
>   configured module search path =
> ['/Users/suneelkumar/.ansible/plugins/modules',
> '/usr/share/ansible/plugins/modules']
>   ansible python module location =
> /Library/Python/3.8/site-packages/ansible
>   executable location = /usr/local/bin/ansible
>   python version = 3.8.2 (default, Apr  8 2021, 23:19:18) [Clang 12.0.5
> (clang-1205.0.22.9)]
> Using /Users/suneelkumar/Documents/Automation/Ansible/ansible.cfg as
> config file
> setting up inventory plugins
> [WARNING]: Failed to load inventory plugin, skipping yml
> host_list declined parsing
> /Users/suneelkumar/Documents/Automation/Ansible/hosts
>  #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not
> pass its verify_file() method
> Skipping due to inventory source not existing or not being readable by the
> current user
> script declined parsing
> /Users/suneelkumar/Documents/Automation/Ansible/hosts
>  #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not
> pass its verify_file() method
> Skipping due to inventory source not existing or not being readable by the
> current user
> auto declined parsing
> /Users/suneelkumar/Documents/Automation/Ansible/hosts
>  #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not
> pass its verify_file() method
> Skipping due to inventory source not existing or not being readable by the
> current user
> yaml declined parsing
> /Users/suneelkumar/Documents/Automation/Ansible/hosts
>  #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not
> pass its verify_file() method
> Skipping due to inventory source not existing or not being readable by the
> current user
> ini declined parsing /Users/suneelkumar/Documents/Automation/Ansible/hosts
>  #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not
> pass its verify_file() method
> Skipping due to inventory source not existing or not being readable by the
> current user
> toml declined parsing
> /Users/suneelkumar/Documents/Automation/Ansible/hosts
>  #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not
> pass its verify_file() method
> advanced_host_list declined parsing
> /Users/suneelkumar/Documents/Automation/Ansible/hosts
>  #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not
> pass its verify_file() method
> Skipping due to inventory source not existing or not being readable by the
> current user
> constructed declined parsing
> /Users/suneelkumar/Documents/Automation/Ansible/hosts
>  #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not
> pass its verify_file() method
> Skipping due to inventory source not existing or not being readable by the
> current user
> yaml declined parsing
> /Users/suneelkumar/Documents/Automation/Ansible/hosts
>  #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not
> pass its verify_file() method
> [WARNING]: Unable to parse
> /Users/suneelkumar/Documents/Automation/Ansible/hosts
>  #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as an
> inventory source
> [WARNING]: No inventory was parsed, only implicit localhost is available
> [WARNING]: provided hosts list is empty, only localhost is available. Note
> that the implicit localhost does not match 'all'
>   hosts (0):
> suneelkumar@LT Ansible %
>
> suneelkumar@LT Ansible % ansible all -m ping
> [WARNING]: Failed to load inventory plugin, skipping yml
> [WARNING]: Unable to parse
> /Users/suneelkumar/Documents/Automation/Ansible/hosts
>  #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as an
> inventory source
> [WARNING]: No inventory was parsed, only implicit localhost is available
> [WARNING]: provided hosts list is empty, only localhost is available. Note
> that the implicit localhost does not match 'all'
> suneelkumar@LT Ansible %
>
> I am running  ansible 2.10.4
>
> Thank you !
>
> regards,
>
> Suneel
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CANuO0k7VyZXVTYSJ_iC3Bw4DTnzMDBm0mxKAUJkkWGk_z86Y0Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CANuO0k7VyZXVTYSJ_iC3Bw4DTnzMDBm0mxKAUJkkWGk_z86Y0Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Matt Martz
@sivel
sivel.net

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v_XpTig%2BOE01bLWJ1%2BT17r4Qq-uhvLoWv%2BtH3t5Z_d%3DwA%40mail.gmail.com.

Reply via email to