summaryrefslogtreecommitdiffstats
path: root/examples/playbooks/test_skip_inside_yaml.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 16:04:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 16:04:56 +0000
commitd964cec5e6aa807b75c7a4e7cdc5f11e54b2eda2 (patch)
tree794bc3738a00b5e599f06d1f2f6d79048d87ff8e /examples/playbooks/test_skip_inside_yaml.yml
parentInitial commit. (diff)
downloadansible-lint-d964cec5e6aa807b75c7a4e7cdc5f11e54b2eda2.tar.xz
ansible-lint-d964cec5e6aa807b75c7a4e7cdc5f11e54b2eda2.zip
Adding upstream version 6.13.1.upstream/6.13.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'examples/playbooks/test_skip_inside_yaml.yml')
-rw-r--r--examples/playbooks/test_skip_inside_yaml.yml50
1 files changed, 50 insertions, 0 deletions
diff --git a/examples/playbooks/test_skip_inside_yaml.yml b/examples/playbooks/test_skip_inside_yaml.yml
new file mode 100644
index 0000000..44d6c28
--- /dev/null
+++ b/examples/playbooks/test_skip_inside_yaml.yml
@@ -0,0 +1,50 @@
+---
+- name: Fixture
+ hosts: all
+ tags:
+ - skip_ansible_lint # should disable error at playbook level
+ tasks:
+ - name: Test # <-- 0 latest[hg]
+ action: ansible.builtin.hg # noqa: fqcn[canonical]
+ - name: Test latest[hg] (skipped) # noqa: latest[hg] fqcn[canonical]
+ action: ansible.builtin.hg
+
+ - name: Test latest[git] and partial-become
+ action: ansible.builtin.git
+ become_user: alice
+ - name: Test latest[git] and partial-become (skipped) # noqa: latest[git] partial-become
+ action: ansible.builtin.git
+ 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 deprecated-command-syntax # <-- 3 deprecated-command-syntax
+ ansible.builtin.command: creates=B chmod 644 A # noqa: no-free-form
+ - name: Test deprecated-command-syntax # <-- 4 deprecated-command-syntax
+ ansible.builtin.command: warn=yes creates=B chmod 644 A # noqa: no-free-form
+ - name: Test deprecated-command-syntax (skipped via no warn)
+ ansible.builtin.command: warn=no creates=B chmod 644 A # noqa: no-free-form
+ - name: Test deprecated-command-syntax (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