diff --git a/handlers/main.yml b/handlers/main.yml index 4636c193b6dafd7259e52449d91ce0ec8731a94e..7265ba6f65c4f461779249bf68b85d19b6b40af0 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -14,8 +14,9 @@ name: netfilter-persistent state: present listen: "save iptables rules" + # we exclude this task from being linted for "no-changed-when", because handlers only ever run if there's a change triggered by a task - name: save iptables rules - ansible.builtin.command: 'netfilter-persistent save' + ansible.builtin.command: 'netfilter-persistent save' # noqa no-changed-when listen: "save iptables rules" when: ansible_os_family == "Debian" @@ -29,8 +30,9 @@ group: "root" mode: "0600" listen: "save iptables rules" + # we exclude this task from being linted for "no-changed-when", because handlers only ever run if there's a change triggered by a task - name: save rules - ansible.builtin.command: /usr/sbin/iptables-save # noqa 303 + ansible.builtin.command: /usr/sbin/iptables-save # noqa no-changed-when listen: "save iptables rules" when: ansible_os_family == "RedHat" diff --git a/molecule/virtualbox_debian11/molecule.yml b/molecule/virtualbox_debian11/molecule.yml index e0506627c737a120c26068121d045cda29ab5139..280948c8887361f4fd199ccbdca10b9778746165 100644 --- a/molecule/virtualbox_debian11/molecule.yml +++ b/molecule/virtualbox_debian11/molecule.yml @@ -7,7 +7,7 @@ driver: lint: | set -e yamllint . - ansible-lint -x no-loop-var-prefix,command-instead-of-module + ansible-lint -x no-loop-var-prefix,command-instead-of-module,package-latest platforms: # Check out the documentation at # https://github.com/ansible-community/molecule-vagrant#documentation diff --git a/tasks/configure_vim.yml b/tasks/configure_vim.yml index f3e867fc98e6b15ef7dbe59bfba841c968fcb099..d7ebf5b41086f40cc024ad7bfa68c375eaea2206 100644 --- a/tasks/configure_vim.yml +++ b/tasks/configure_vim.yml @@ -1,7 +1,7 @@ --- # see http://vimdoc.sourceforge.net/htmldoc/starting.html#system-vimrc - name: install systemwide vimrc config - template: + ansible.builtin.template: src: "etc/vim/vimrc.local.j2" dest: "/etc/vimrc.local" owner: "root"