Skip to content

2.1.21 possible wrong ansible condition #131

@Jurka007

Description

@Jurka007

Section 2.1.21 | WARN | has

   when:
        - "'exim4' not in ansible_facts.packages"
        - "'postfix' not in ansible_facts.packages"

Ansible evaluates the when section as logical AND so unless you have both installed it will always create the warning.

As the debug message say you want to have OR instead which would need to look like this:

   when:
        - "'exim4' not in ansible_facts.packages or 'postfix' not in ansible_facts.packages"

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingmerged in develSolution is merged in devel

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions