summaryrefslogtreecommitdiffstats
path: root/examples/playbooks/skiptasks.yml
blob: e105ed30812b205bd23abba759298bcf108390c3 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
- hosts: all

  tasks:
    - name: Test latest[git]
      action: ansible.builtin.git

    - name: Test latest[hg]
      action: ansible.builtin.hg

    - name: Test command-instead-of-module
      ansible.builtin.command: git log
      changed_when: false

    - name: Test no-free-form
      ansible.builtin.command: creates=B chmod 644 A

    - name: Test latest[git] (skip)
      action: ansible.builtin.git
      tags:
        - skip_ansible_lint

    - name: Test latest[hg] (skip)
      action: ansible.builtin.hg
      tags:
        - skip_ansible_lint

    - name: Test command-instead-of-module (skip)
      ansible.builtin.command: git log
      tags:
        - skip_ansible_lint

    - name: Test no-free-form (skip)
      ansible.builtin.command: chmod 644 A
      tags:
        - skip_ansible_lint

    - name: Test latest[git] (don't warn)
      ansible.builtin.command: git log
      args:
        warn: false
      changed_when: false

    - name: Test latest[hg] (don't warn)
      ansible.builtin.command: chmod 644 A
      args:
        warn: false
        creates: B

    - name: Test latest[hg] (warn)
      ansible.builtin.command: chmod 644 A
      args:
        warn: true
        creates: B

    - name: Test latest[git] (don't warn single line)
      ansible.builtin.command: warn=False chdir=/tmp/blah git log
      changed_when: false

    - name: Test latest[hg] (don't warn single line)
      ansible.builtin.command: warn=no creates=B chmod 644 A

    - name: Test latest[hg] (warn single line)
      ansible.builtin.command: warn=yes creates=B chmod 644 A