summaryrefslogtreecommitdiffstats
path: root/examples/playbooks/rule_literal_compare_pass.yml
blob: 56737cb3a08cd74e61df2680a89db3bf4e374527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
- name: Fixture for literal-compare
  hosts: localhost
  tasks:
    - name: Example task
      ansible.builtin.debug:
        msg: test
      when: my_var

    - name: Another example task
      ansible.builtin.debug:
        msg: test
      when:
        - 1 + 1 == 2
        - true

    - name: Example task
      ansible.builtin.debug:
        msg: test
      when: not my_var

    - name: Example task
      ansible.builtin.debug:
        msg: test
      when: my_var not None