For the file group_vars/windows/main.yml
I suggest to use ansible vault
Last active
August 8, 2018 16:15
-
-
Save realtebo/fb114b63a7e99830f4c7fb167668800f to your computer and use it in GitHub Desktop.
Starting with ansible
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
# /etc/ansible/hosts.yaml | |
[local] | |
localhost ansible_connection=local | |
[windows] | |
192.168.1.123 | |
[windows:vars] | |
ansible_connection=winrm | |
ansible_winrm_scheme=http |
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
#group_vars/windows/main.yaml | |
desktop_username: "plain username" | |
desktop_password: "plain_password" |
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 | |
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