Haven't checked device logs just yet. These are RHEL7 systems with XFS
filesystems.
I've internally chalked this up to a "race condition", where multiple
Ansible process forks are trying to update the same file at nearly the same
time. As an experiment, I added the "serial" directive to the play and set
it to "1":
Example:
- name: Ensure all machines have /etc/hosts entries
become: true
hosts: [machines]
serial: 1
tasks:
- <blah>
I see the difference in Ansible's console output, where it is doing the
lineinfile call to one host at a time vice all at once. I've only run it a
few times after this change but have yet to see the empty file problem.
I'll continue running tests to ensure this is a good fix.
v/r
Ben
On Tue, Feb 28, 2017 at 10:14 AM, Brian Coca <[email protected]> wrote:
> It sounds like corruption after writing, after you get the first 0
> length file it makes sense that it stays that way if it cannot match
> the line to change.
> what is your filesytem? anything show up in the logs? devices errors?
> write errors?
>
>
> ----------
> Brian Coca
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/to
> pic/ansible-project/SP8KJnwSxWc/unsubscribe.
> To unsubscribe from this group and all its topics, 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/ms
> gid/ansible-project/CACVha7eRwFW1KLnAAHCw8JuN8QdXFzq_Yf%
> 3DkmZKHPnMtXfGMOw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
--
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/CABJf-Esnx2Q5LA6S1iexiAMC_EPzqrSQf6c6S5wrGARfjFt6Cw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.