So if I run Ansible without --check it will configure the Icinga2 host. And when I then run it with --check it works perfectly fine. But if there are pending changes and I run it with --check, it will fail.
Here are the steps to reproduce:
- Run it without
--check → Host is configured
- Run it with
--check → no changes → it works
- Add new Icinga2 object
- Run it with
--check → Ansible fails
I think the reason is that the icinga2_fragments are not actually written to /var/tmp/icinga. So Ansible wants to write something to write a new fragment, but it doesn't do it because I run it in check mode. Later it wants to assemble the config. But then it fails and I think the reason is that the fragment it tries to access doesn't exist.
I think we could simply write fragments to /var/tmp/icinga, even if we run Ansible in check mode.
How are you handling this? Are you simply running it without check?
So if I run Ansible without
--checkit will configure the Icinga2 host. And when I then run it with--checkit works perfectly fine. But if there are pending changes and I run it with--check, it will fail.Here are the steps to reproduce:
--check→ Host is configured--check→ no changes → it works--check→ Ansible failsI think the reason is that the
icinga2_fragmentsare not actually written to/var/tmp/icinga. So Ansible wants to write something to write a new fragment, but it doesn't do it because I run it incheckmode. Later it wants to assemble the config. But then it fails and I think the reason is that the fragment it tries to access doesn't exist.I think we could simply write fragments to
/var/tmp/icinga, even if we run Ansible in check mode.How are you handling this? Are you simply running it without
check?