what does this command Mean?

85 views
Skip to first unread message

Prabhakaran Karuppaih

unread,
Oct 2, 2020, 4:28:35 AM10/2/20
to Ansible Project
ansible -m ping all

Why am I getting the same warnings and Errors when I tried running my Playbook? (starfish.yml)

So, that means: My Playbook is Right? But something important is Not. What is that?
Please Help...Thank You.

With Hope,
Prabhakaran

The following are the Warnings and Errors:
/usr/lib/python2.7/site-packages/ansible/parsing/vault/__init_.py:44: CyptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
     from cryptography.exceptions import InvalidSignature
[WARNING]: * Failed to parse /etc/ansible/hosts with yaml plugin: We were unable to read either as JSON nor YAML, these are the errors we got from each: JSON: No JSON object could be decoded Syntax Error while loading YAML. expected '<document start>', but found '[' The error appears to be in '/etc/ansible/hosts': line 4, column 1, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: ] [starfish] ^ here
[WARNING]: * Failed to parse /etc/ansible/hosts with ini plugin: need more than 2 values to upack
[WARNING]:  Unable to parse /etc/ansible/hosts 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' 

Avinash Jadhav

unread,
Oct 2, 2020, 4:41:34 AM10/2/20
to ansible...@googlegroups.com
Hello  Prabhakaran,

What exactly you want try is it ping or any other task 

Please add the host/ target IP or DNS in hosts files  the perform below operation 

If ping then try 
1 create playbookdemo.yml
2 copy below code and paste playbookdemo.yml
   
   ---
 - name: "Get ping response"
   hosts: all
   tasks:
   - action: ping
     register: hello
   - debug: msg="{hello.stdout}"
3 Run using this ad-hoc command 

ansible-playbook playbookdemo.yml 

if you want to try to resolve error and warning please update you python package above 2.7

or if you want to try encrypted you playbook then you should try to ansible-playbook starfish.yml --ask-vault-pass


--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5ec66558-240f-43dd-8391-86608e85d221n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages