Skip to content

Ansible fails when running in check mode #393

@lucagubler

Description

@lucagubler

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:

  1. Run it without --check → Host is configured
  2. Run it with --check → no changes → it works
  3. Add new Icinga2 object
  4. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions