cae0bfdf9d
When updating the inventory, write to a temp file and replace the original once writing is complete, to allow for an atomic replacement of the contents. Ensures that ansible reading an inventory file will get either the old or new contents, but never the truncated version of the file that appears should you open it with 'w' mode set to replace the contents. Solves the 'provided hosts list is empty' error, which is emitted by ansible should it manage to be reading the inventory file just as it was truncated, but before the new contents were flushed to disk. Partially-Fixes: #6526 |
||
---|---|---|
.. | ||
ansible | ||
cfengine | ||
chef | ||
docker | ||
file | ||
puppet | ||
salt | ||
shell |