From d1dad9b4fd12e3cdbf2f456ba2dbbb766fee5d92 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 25 Oct 2025 10:36:54 +0200 Subject: [PATCH] Add some ansible-lint ignores. --- tests/integration/targets/connection/test_connection.yml | 2 +- tests/integration/targets/connection_docker/setup.yml | 2 +- tests/integration/targets/connection_docker_api/setup.yml | 4 ++-- tests/integration/targets/connection_nsenter/setup.yml | 2 +- .../targets/docker_config/tasks/test_docker_config.yml | 6 +++--- .../targets/docker_image_export/tasks/tests/basic.yml | 2 +- .../targets/docker_secret/tasks/test_secrets.yml | 4 ++-- tests/integration/targets/docker_stack/tasks/test_stack.yml | 2 +- .../integration/targets/docker_swarm/tasks/tests/basic.yml | 4 ++-- .../inventory_docker_containers/playbooks/docker_setup.yml | 4 ++-- .../inventory_docker_machine/playbooks/pre-setup.yml | 4 ++-- .../inventory_docker_machine/playbooks/test_inventory_1.yml | 2 +- .../inventory_docker_swarm/playbooks/swarm_setup.yml | 2 +- tests/integration/targets/setup_docker/tasks/Debian.yml | 2 +- tests/integration/targets/setup_docker/tasks/RedHat-7.yml | 2 +- .../targets/setup_docker_python_deps/tasks/main.yml | 2 +- tests/integration/targets/setup_pkg_mgr/tasks/main.yml | 2 ++ 17 files changed, 25 insertions(+), 23 deletions(-) diff --git a/tests/integration/targets/connection/test_connection.yml b/tests/integration/targets/connection/test_connection.yml index 7f8b5697..b6327f8c 100644 --- a/tests/integration/targets/connection/test_connection.yml +++ b/tests/integration/targets/connection/test_connection.yml @@ -3,7 +3,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -- hosts: "{{ target_hosts }}" +- hosts: "{{ target_hosts }}" # noqa: syntax-check[specific] gather_facts: false serial: 1 tasks: diff --git a/tests/integration/targets/connection_docker/setup.yml b/tests/integration/targets/connection_docker/setup.yml index e522a51f..e18c2554 100644 --- a/tests/integration/targets/connection_docker/setup.yml +++ b/tests/integration/targets/connection_docker/setup.yml @@ -11,4 +11,4 @@ tasks: - name: Setup docker import_role: - name: setup_docker + name: setup_docker # noqa: syntax-check[specific] diff --git a/tests/integration/targets/connection_docker_api/setup.yml b/tests/integration/targets/connection_docker_api/setup.yml index 0b073884..2de0d882 100644 --- a/tests/integration/targets/connection_docker_api/setup.yml +++ b/tests/integration/targets/connection_docker_api/setup.yml @@ -11,8 +11,8 @@ tasks: - name: Setup docker import_role: - name: setup_docker + name: setup_docker # noqa: syntax-check[specific] - name: Setup docker Python deps import_role: - name: setup_docker_python_deps + name: setup_docker_python_deps # noqa: syntax-check[specific] diff --git a/tests/integration/targets/connection_nsenter/setup.yml b/tests/integration/targets/connection_nsenter/setup.yml index e522a51f..e18c2554 100644 --- a/tests/integration/targets/connection_nsenter/setup.yml +++ b/tests/integration/targets/connection_nsenter/setup.yml @@ -11,4 +11,4 @@ tasks: - name: Setup docker import_role: - name: setup_docker + name: setup_docker # noqa: syntax-check[specific] diff --git a/tests/integration/targets/docker_config/tasks/test_docker_config.yml b/tests/integration/targets/docker_config/tasks/test_docker_config.yml index f67c0887..f22ed37f 100644 --- a/tests/integration/targets/docker_config/tasks/test_docker_config.yml +++ b/tests/integration/targets/docker_config/tasks/test_docker_config.yml @@ -20,7 +20,7 @@ advertise_addr: "{{ ansible_default_ipv4.address | default('127.0.0.1') }}" - name: Parameter name should be required - community.docker.docker_config: + community.docker.docker_config: # noqa: args[module] state: present ignore_errors: true register: output @@ -32,7 +32,7 @@ - 'output.msg == "missing required arguments: name"' - name: Test parameters - community.docker.docker_config: + community.docker.docker_config: # noqa: args[module] name: foo state: present ignore_errors: true @@ -261,7 +261,7 @@ community.docker.docker_config: name: db_password data: opensesame! - template_driver: "not a template driver" + template_driver: "not a template driver" # noqa: args[module] state: present ignore_errors: true register: output diff --git a/tests/integration/targets/docker_image_export/tasks/tests/basic.yml b/tests/integration/targets/docker_image_export/tasks/tests/basic.yml index 0f0e15ef..e81dd691 100644 --- a/tests/integration/targets/docker_image_export/tasks/tests/basic.yml +++ b/tests/integration/targets/docker_image_export/tasks/tests/basic.yml @@ -46,7 +46,7 @@ register: result - name: Extract manifest.json files - ansible.builtin.command: tar xvf "{{ remote_tmp_dir }}/{{ item.file }}" manifest.json --to-stdout + ansible.builtin.command: tar xvf "{{ remote_tmp_dir }}/{{ item.file }}" manifest.json --to-stdout # noqa: command-instead-of-module loop: "{{ image_tasks }}" loop_control: label: "{{ item.file }}" diff --git a/tests/integration/targets/docker_secret/tasks/test_secrets.yml b/tests/integration/targets/docker_secret/tasks/test_secrets.yml index 1107138e..6cf163c0 100644 --- a/tests/integration/targets/docker_secret/tasks/test_secrets.yml +++ b/tests/integration/targets/docker_secret/tasks/test_secrets.yml @@ -15,7 +15,7 @@ advertise_addr: "{{ ansible_default_ipv4.address | default('127.0.0.1') }}" - name: Parameter name should be required - community.docker.docker_secret: + community.docker.docker_secret: # noqa: args[module] state: present ignore_errors: true register: output @@ -27,7 +27,7 @@ - 'output.msg == "missing required arguments: name"' - name: Test parameters - community.docker.docker_secret: + community.docker.docker_secret: # noqa: args[module] name: foo state: present ignore_errors: true diff --git a/tests/integration/targets/docker_stack/tasks/test_stack.yml b/tests/integration/targets/docker_stack/tasks/test_stack.yml index eca04231..7365bc4f 100644 --- a/tests/integration/targets/docker_stack/tasks/test_stack.yml +++ b/tests/integration/targets/docker_stack/tasks/test_stack.yml @@ -20,7 +20,7 @@ - name: Create a stack without name register: output - community.docker.docker_stack: + community.docker.docker_stack: # noqa: args[module] state: present ignore_errors: true diff --git a/tests/integration/targets/docker_swarm/tasks/tests/basic.yml b/tests/integration/targets/docker_swarm/tasks/tests/basic.yml index cccff4a7..46e2a25f 100644 --- a/tests/integration/targets/docker_swarm/tasks/tests/basic.yml +++ b/tests/integration/targets/docker_swarm/tasks/tests/basic.yml @@ -10,7 +10,7 @@ ## Errors ########################################################## #################################################################### - name: Test parameters with state=join - community.docker.docker_swarm: + community.docker.docker_swarm: # noqa: args[module] state: join ignore_errors: true register: output @@ -22,7 +22,7 @@ - 'output.msg == "state is join but all of the following are missing: remote_addrs, join_token"' - name: Test parameters with state=remove - community.docker.docker_swarm: + community.docker.docker_swarm: # noqa: args[module] state: remove ignore_errors: true register: output diff --git a/tests/integration/targets/inventory_docker_containers/playbooks/docker_setup.yml b/tests/integration/targets/inventory_docker_containers/playbooks/docker_setup.yml index dab52c7a..cfe834fe 100644 --- a/tests/integration/targets/inventory_docker_containers/playbooks/docker_setup.yml +++ b/tests/integration/targets/inventory_docker_containers/playbooks/docker_setup.yml @@ -11,11 +11,11 @@ tasks: - name: Setup docker ansible.builtin.import_role: - name: setup_docker + name: setup_docker # noqa: syntax-check[specific] - name: Setup Docker Python deps ansible.builtin.import_role: - name: setup_docker_python_deps + name: setup_docker_python_deps # noqa: syntax-check[specific] - name: Start containers community.docker.docker_container: diff --git a/tests/integration/targets/inventory_docker_machine/playbooks/pre-setup.yml b/tests/integration/targets/inventory_docker_machine/playbooks/pre-setup.yml index f0e8f767..88ec9b91 100644 --- a/tests/integration/targets/inventory_docker_machine/playbooks/pre-setup.yml +++ b/tests/integration/targets/inventory_docker_machine/playbooks/pre-setup.yml @@ -8,11 +8,11 @@ tasks: - name: Setup docker ansible.builtin.include_role: - name: setup_docker + name: setup_docker # noqa: syntax-check[specific] - name: Setup Docker Python deps ansible.builtin.import_role: - name: setup_docker_python_deps + name: setup_docker_python_deps # noqa: syntax-check[specific] # There seems to be no better way to install docker-machine. At least I couldn't find any packages for RHEL7/8. - name: Download docker-machine binary diff --git a/tests/integration/targets/inventory_docker_machine/playbooks/test_inventory_1.yml b/tests/integration/targets/inventory_docker_machine/playbooks/test_inventory_1.yml index 3b326933..4de8c15e 100644 --- a/tests/integration/targets/inventory_docker_machine/playbooks/test_inventory_1.yml +++ b/tests/integration/targets/inventory_docker_machine/playbooks/test_inventory_1.yml @@ -8,7 +8,7 @@ tasks: - name: sanity check Docker Machine output vars: - dm_ls_format: !unsafe '{{.Name}} | {{.DriverName}} | {{.State}} | {{.URL}} | {{.Error}}' + dm_ls_format: !unsafe '{{.Name}} | {{.DriverName}} | {{.State}} | {{.URL}} | {{.Error}}' # noqa: jinja[invalid] success_regex: "^vm | [^|]+ | Running | tcp://.+ |$" ansible.builtin.command: docker-machine ls --format '{{ dm_ls_format }}' register: result diff --git a/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_setup.yml b/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_setup.yml index 03072285..be1216f4 100644 --- a/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_setup.yml +++ b/tests/integration/targets/inventory_docker_swarm/playbooks/swarm_setup.yml @@ -11,7 +11,7 @@ tasks: - name: Setup docker ansible.builtin.import_role: - name: setup_docker + name: setup_docker # noqa: syntax-check[specific] - name: Setup Docker SDK for Python ansible.builtin.import_role: diff --git a/tests/integration/targets/setup_docker/tasks/Debian.yml b/tests/integration/targets/setup_docker/tasks/Debian.yml index 8ac536a7..0f9bc958 100644 --- a/tests/integration/targets/setup_docker/tasks/Debian.yml +++ b/tests/integration/targets/setup_docker/tasks/Debian.yml @@ -35,7 +35,7 @@ name: Add Docker repo on Ubuntu 20 or before, or Debian 11 or before block: - name: Add gpg key - ansible.builtin.shell: curl -fsSL https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg >key && apt-key add key + ansible.builtin.shell: curl -fsSL https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg >key && apt-key add key # noqa: command-instead-of-module - name: Add Docker repo ansible.builtin.apt_repository: diff --git a/tests/integration/targets/setup_docker/tasks/RedHat-7.yml b/tests/integration/targets/setup_docker/tasks/RedHat-7.yml index 8b6ecdde..b4315b12 100644 --- a/tests/integration/targets/setup_docker/tasks/RedHat-7.yml +++ b/tests/integration/targets/setup_docker/tasks/RedHat-7.yml @@ -30,7 +30,7 @@ gpgkey: https://download.docker.com/linux/centos/gpg - name: Update cache - ansible.builtin.command: yum -y makecache fast + ansible.builtin.command: yum -y makecache fast # noqa: command-instead-of-module - name: Install docker ansible.builtin.dnf: diff --git a/tests/integration/targets/setup_docker_python_deps/tasks/main.yml b/tests/integration/targets/setup_docker_python_deps/tasks/main.yml index ea007b04..9d69346e 100644 --- a/tests/integration/targets/setup_docker_python_deps/tasks/main.yml +++ b/tests/integration/targets/setup_docker_python_deps/tasks/main.yml @@ -28,5 +28,5 @@ - git+https://github.com/psf/requests - git+https://github.com/urllib3/urllib3 extra_args: "-c {{ remote_constraints }}" - state: latest + state: latest # noqa: package-latest when: force_docker_sdk_for_python_dev | default(false) diff --git a/tests/integration/targets/setup_pkg_mgr/tasks/main.yml b/tests/integration/targets/setup_pkg_mgr/tasks/main.yml index 45e90f92..a67e2f36 100644 --- a/tests/integration/targets/setup_pkg_mgr/tasks/main.yml +++ b/tests/integration/targets/setup_pkg_mgr/tasks/main.yml @@ -21,12 +21,14 @@ when: ansible_os_family == "Suse" - ansible.builtin.shell: + # noqa: command-instead-of-module cmd: | sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/*.repo sed -i 's%#baseurl=http://mirror.centos.org/%baseurl=https://vault.centos.org/%g' /etc/yum.repos.d/*.repo when: ansible_distribution in 'CentOS' and ansible_distribution_major_version == '7' - ansible.builtin.shell: + # noqa: command-instead-of-module cmd: | sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*.repo sed -i 's%#baseurl=http://mirror.centos.org/$contentdir/$releasever/%baseurl=https://vault.centos.org/8.4.2105/%g' /etc/yum.repos.d/CentOS-Linux-*.repo