summaryrefslogtreecommitdiff
path: root/examples/basic_conditions.yaml
blob: 655b800615032013d4d13d3c8612ae1a57be92c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
hosts: localhost
parallelism: false

tasks:
  - name: Pausa si el host es localhost
    module: wait
    args:
      seconds: 1
    condition: '[ "{{ name }}" = "localhost" ]'

  - name: Pausa solo si existe el archivo /tmp/flag.txt
    module: wait
    args:
      seconds: 2
    condition: 'test -f /tmp/flag.txt'