summaryrefslogtreecommitdiffstats
path: root/examples/playbooks/test_skip_inside_yaml.yml
blob: 1f7295442a8dca1d1dd190119b139810feee82ee (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
---
- name: Fixture
  hosts: all
  tags:
    - skip_ansible_lint # should disable error at playbook level
  tasks:
    - name: Test
      action: community.general.hg
      args:
        repo: foo
        version: HEAD

    - name: Test latest[hg] (skipped)
      action: community.general.hg
      args:
        repo: foo
        # revision: HEAD

    - name: Test latest[git] and partial-become # noqa: latest[git]
      action: ansible.builtin.git
      args:
        repo: foo
        version: HEAD
      become_user: alice

    - name: Test latest[git] and partial-become (skipped) # noqa: latest[git] partial-become
      action: ansible.builtin.git
      args:
        repo: foo
        version: HEAD
      become_user: alice

    - name: Test YAML # <-- 1 jinja[spacing]
      ansible.builtin.get_url:
        # noqa: risky-file-permissions
        url: http://example.com/really_long_path/really_long_path/really_long_path/really_long_path/really_long_path/really_long_path/really_long_path/really_long_path/file.conf # <-- 2 yaml[line-length]
        dest: "{{dest_proj_path}}/foo.conf"
    - name: Test YAML and jinja[spacing] (skipped)
      ansible.builtin.get_url:
        # noqa: risky-file-permissions
        url: http://example.com/really_long_path/really_long_path/really_long_path/really_long_path/really_long_path/really_long_path/really_long_path/really_long_path/file.conf # noqa: yaml[line-length]
        dest: "{{dest_proj_path}}/foo.conf" # noqa: jinja[spacing]

    - name: Test no-free-form # <-- 3 no-free-form
      ansible.builtin.command: creates=B chmod 644 A # noqa: no-free-form
    - name: Test no-free-form # <-- 4 no-free-form
      ansible.builtin.command: warn=yes creates=B chmod 644 A # noqa: no-free-form
    - name: Test no-free-form (skipped via no warn)
      ansible.builtin.command: warn=no creates=B chmod 644 A # noqa: no-free-form
    - name: Test no-free-form (skipped via skip_ansible_lint)
      ansible.builtin.command: creates=B chmod 644 A # noqa: no-free-form
      tags:
        - skip_ansible_lint

- name: Fixture 2
  hosts: localhost
  tasks:
    - name: Foo
      become: true
      block:
        - name: Bar
          become_user: john_doe
          ansible.builtin.command: "/etc/test.sh"
          changed_when: false