Skip to content

Instantly share code, notes, and snippets.

@realtebo
Last active August 8, 2018 16:15
Show Gist options
  • Save realtebo/fb114b63a7e99830f4c7fb167668800f to your computer and use it in GitHub Desktop.
Save realtebo/fb114b63a7e99830f4c7fb167668800f to your computer and use it in GitHub Desktop.
Starting with ansible
# /etc/ansible/hosts.yaml
[local]
localhost ansible_connection=local
[windows]
192.168.1.123
[windows:vars]
ansible_connection=winrm
ansible_winrm_scheme=http

For the file group_vars/windows/main.yml I suggest to use ansible vault

#group_vars/windows/main.yaml
desktop_username: "plain username"
desktop_password: "plain_password"
---
- hosts: windows
name: "Test ping verso macchina Windows"
vars:
ansible_user: "{{ desktop_username }}"
ansible_password: "{{ desktop_password }}"
tasks:
- name: 'Include some additional variables'
win_ping:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment