Created
January 29, 2018 23:38
-
-
Save gravcat/09a2ba7bc8250a2ea98f937bcb528f4a to your computer and use it in GitHub Desktop.
Use the built-in win_ping module in Ansible to confirm proper connectivity and credential success for manipulating Windows hosts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: windows | |
tasks: | |
- name: ping | |
win_ping: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @TridevGuha! Welcome to Ansible, it's a wonderful tool.
https://docs.ansible.com/ansible/latest/user_guide/intro_getting_started.html#action-create-a-basic-inventory
https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html#basics
As for the basics to get this rolling in a clean way you'll need
hosts
)group_vars/windows.yml
)main.yml
)It looks like you are putting your playbook as group_vars by mistake, and ansible is trying to read it and failing. Move
windows1.yml
to../main.yml
In
group_vars/windows.yml
, place:At this point, it should work :)
unrelated, here's an example of a simple playbook. Doesn't include
group_vars
like this one would, but shows how yourmain.yml
playbook entrypoint should be!https://gitlab.com/adrift/ansible/-/tree/master/update-rust