[ansible-project] Getting string from an XML URL response

2017-10-27 Thread Marc L
Hi, I have a URL that I call with a GET, and that returns an XML response. I'd like to parse that response (I could use grep), but I'm struggling to get the response content. - name: Get OHP Group Passcode uri: url: "{{ node_protocol }}://{{ inventory_hostname

Re: [ansible-project] Identify if host being processed is the first in any the groups being processed

2017-10-02 Thread Marc L
aybooks, only templates, and you might > run into bugs if your group has zero hosts. You also need to consider the > scenario where a host is in more than one group. > > On Mon, Oct 2, 2017 at 2:06 AM, Marc L <marc@gmail.com > > wrote: > >> I have some tasks th

[ansible-project] Identify if host being processed is the first in any the groups being processed

2017-10-02 Thread Marc L
I have some tasks that should only be processed if the host (inventory_hostname) is the first in the group of servers it's defined in. For example, here is my hosts file. Note that the group names are not fixed - the Role I want to use them in cannot rely on the name of the groups - it needs

Re: [ansible-project] Calling URI task to 10 servers in parallel

2017-10-01 Thread Marc L
UTC+1, Kai Stian Olstad wrote: > > On 01. okt. 2017 15:16, Marc L wrote: > > Is there any other way to do this? > > - hosts: node1,node2 >gather_facts: no > >vars: > ohp_auth_user: "username" > ohp_auth_password: "passwo

[ansible-project] Calling URI task to 10 servers in parallel

2017-10-01 Thread Marc L
Ansible newbie We run a large enterprise web app load balanced over 10 servers in a customer environment (windows servers) The app exposes a set of Webservices to manage config, such as applying new binaries, exporting config as XML etc. Sometimes we need to update the application, and