Linux Command Node:   CentOs 6,  Ansible 2.1, Python 2.7.13
Windows Remote Nodes:    Windows 7, Powershell 3.0
Encryption: SSL

So far I've figured out how to use these tricks in my playbook to do stuff 
on the remote Windows node from the command node.  Are there other methods 
I've left out?

Use Ansible Modules 
<http://docs.ansible.com/ansible/latest/list_of_all_modules.html> (especially 
those starting with "win_" 
<http://docs.ansible.com/ansible/latest/list_of_windows_modules.html>) to 
do something on a remote node

  - name: Copy a windows file from control node to remote node
    win_copy <http://docs.ansible.com/ansible/latest/win_copy_module.html>: 
src="/etc/ansible/winFiles/getFileVersion.exe" dest="C:/Temp/"

  -name: Restart a remote node
    win_reboot: 
<http://docs.ansible.com/ansible/latest/win_reboot_module.html>

Use the Ansible "raw:" module 
<http://docs.ansible.com/ansible/latest/raw_module.html> to run commands or 
executables on the remote node

  - name: Issue a Windows command to run on a remote node from control node 
    raw: Rename  
<https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/rename.mspx?mfr=true>C:/temp/oldName.txt
 
C:/temp/newName.txt

  - name: Issue a Powershell Cmdlet to run on a remote node from control 
node 
    raw: Copy-Item 
<https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/copy-item?view=powershell-3.0>
 "C:/source/*.*" 
-Destination "C:/destination/"

  - name: Execute windows executable previously copied to a remote node 
from the control node
    raw: C:/temp/getFileVersion.exe "C:/Windows/driver.dll"

Use the Ansible "script:" 
<http://docs.ansible.com/ansible/latest/script_module.html> module to *copy, 
run and delete* a Powershell module on the remote node from the control 
node.  

  - name: run a powershell script on a remote node from the control node
    script: <http://docs.ansible.com/ansible/latest/script_module.html> 
/etc/ansible/psScripts/doesItemExist.ps1 
"C:/TempBackup/"

Other ideas?

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/87d0538d-c309-4d5e-b778-62b28baa5e4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to