On 05.09.2016 07:16, AnsiNoob wrote:
My register works fine with usual playbooks but the moment I use
register
with with_together then no value is saved in variable? :(
That's because all the with_ that combines data have a different schema
than ordinary register.
*My playbook:*
- name: check for port on remote host
hosts: localhost
connection: local
vars_files:
- vars1.yml
tasks:
- name: check for ports
debug: msg="x is {{ item.0 }}, y is {{ item.1 }} and z is {{
item.2
}}"
with_together:
- "{{ x }}"
- "{{ y }}"
- "{{ z }}"
register: result
- debug: var=result.stdout_lines
Try
- debug: var=result
instead and you will see that the schema is different for the with_'s
--
Kai Stian Olstad
--
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/6eaa37e41c9f61732ca9111bd955d1e8%40olstad.com.
For more options, visit https://groups.google.com/d/optout.