Hi there - I'm trying to do something I think should be fairly easy, but I can't seem to find the right magic. I'd like to run a set of commands on behalf of my server, against *any one of another group of servers*. Basically I need to run a script on *any one domain controller* as part of the server setup process.
If I do something like this: delegate_to: "{{ item }}" with_items: groups.domain_controllers it will run on *all* the servers in that group. I've tried adding run_once: true and that doesn't seem to help, and I've also tried using delegate_to: [ "dc1", "dc2"], but it doesn't seem to want a list. I've also tried: retries: 1 register: result until: result.rc == 0 which at least seems to execute the test, but I can't seem to find a conditional check that works here... The set of commands will all need to execute on the *same server* (it's copying a batch file up, executing it and returning the results). Is there a standard way to do this in ansible? Any help is appreciated, and thanks in advance! -- 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/2c9ff497-c84c-4aea-8dbc-26c61a675f58%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.