before I file a bug report
playbook to reproduce is below
change hosts line to specify three or more individual hosts, or a group
containing three or more hosts
after running playbook /tmp/test.out is expected to contain 1 line for each
host
but it will often be missing one or more lines
run playbook again and get a different result
---
- hosts: ds1:ds2:ds3
remote_user: root
vars:
outfile: /tmp/test.out
tasks:
- name: test | start with empty local file
local_action: file path={{ outfile }} state=absent
run_once: true
- name: test | generate output one line per host
shell: "echo {{ ansible_hostname }} file.sh dbname"
register: hostout
- debug: var=hostout.stdout
- name: test | create local file listing all output from above
local_action: lineinfile dest={{ outfile }} line="{{ hostout.stdout
}}" create=yes
--
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/673651ca-a86e-4938-af82-82500a08b51a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.