I thought of a workaround but I can't seem to get that to work either... :(

This is a snippet:

- name: test
  gather_facts: false
  hosts: backend
  tasks:
    - debug: msg='{{ last_frontend_host_seen|default("") }}'

    - set_fact:
        last_frontend_host_seen: "{{ frontend_host }}"  


Basically, attemping to loop over all backend hosts and store the 
'frontend' host (from which, if i can get this to work, I could assemble a 
list to pass in to the next task).
Sadly the output from this is that 'last_frontend_host_seen' always appears 
to be "" (the default that I set).

- set_fact:
   a: "b"
- set_fact: 
  a: "c" 

results in 'a' being 'c', so it seems to have to do with the fact that for 
every host the 'facts' are being reset I guess? Another way I could do this 
that does carry across host processing?


-- 
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/27c91811-731a-432a-9691-a47529ac8fce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to