Hello all, I have been running on occasion into situations where an incomplete run could leave a system in inconsistent state. This has mostly happened in cases where handlers are in use.
As an example, let's say you have a task populating /etc/aliases for Postfix. In order for Postfix to be able to use the data, /etc/aliases has to be compiled using the newaliases command. This is a natural fit for a single Ansible task + handler (this is a very simple case, I've had some more complex cases too). The problem stems from the fact that Ansible playbook run could fail before the handler fires off - leaving the /etc/aliases file updated, but not the /etc/aliases.db (created via newaliases command). I am aware of the "force_handlers = True" option, however that won't help in cases where failure is, say, due to SSH connection dropping etc. >From what I can tell, this scenario possibly happens exclusively when using handlers, since those are rather stateless (I'm sure you could also trigger such behaviour with poorly designed command/shell combination of tasks). How do folks usually handle such situations? Best regards -- Branko Majic Jabber: [email protected] Please use only Free formats when sending attachments to me. Бранко Мајић Џабер: [email protected] Молим вас да додатке шаљете искључиво у слободним форматима. -- 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/20160309100943.247d01f8%40zetkin.primekey.se. For more options, visit https://groups.google.com/d/optout.
