As I understand it, the win_psexec action connects to a Windows host via 
winrm and then uses that to run commands on a second Windows host via 
psexec?

My question is how to write a playbook such that the first (proxy) host is 
always constant, but the second hosts are the ones defined in the inventory 
and/or filtered on the command line (not listed in the 
playbook/role/variables).
i.e. I want to run a playbook against, say, 10 hosts.  Each time the 
win_psexec action runs, I want it to connect to 'proxyserver' and use that 
to run remote commands on the 10 hosts, but without defining those hosts in 
the playbook as otherwise they'd keep needing to be changed.

(What I'm actually trying to do is to have a playbook to actually install 
powershell3+ and run a script to configure winrm access to allow direct 
ansible connection without having to go round and do that on every single 
server by hand, so if there's another way to do that - or what I'm wanting 
to do simply can't be done via win_psexec then would be grateful to hear 
that also!)

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d920e574-2561-4019-a5bd-3972ce1b3200%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to