diff --git a/.ansible-lint b/.ansible-lint index 5620f63fdead7345765426d57e39bbf4809773f4..491cf7284b00ab41618ecc8b7cedeb4a2eed9ff9 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -38,6 +38,7 @@ skip_list: - skip_this_tag - git-latest - name[casing] + - package-latest # Any rule that has the 'opt-in' tag will not be loaded unless its 'id' is # mentioned in the enable_list: diff --git a/handlers/main.yml b/handlers/main.yml index 1b1581ba52eaaeb8eb246cc2a80676b0b2a0536d..2ce53975a0bf74c58300391b652a32d5f8a84f3e 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -38,6 +38,7 @@ - name: activate kernel parameter changes ansible.builtin.command: sysctl -p + changed_when: false - name: daemon-reload ansible.builtin.systemd: diff --git a/molecule/virtualbox_centos7/molecule.yml b/molecule/virtualbox_centos7/molecule.yml index d1b7f16aab47ea64e86f3c59fd440cb8dadf5911..2e859f6fce16cbe24b2c44d8727080d92a46f9da 100644 --- a/molecule/virtualbox_centos7/molecule.yml +++ b/molecule/virtualbox_centos7/molecule.yml @@ -34,7 +34,7 @@ platforms: # Dictionary of `config` options. config_options: ssh.keep_alive: true - ssh.remote_user: "'lza'" + ssh.remote_user: "lza" disksize.size: '20GB' provisioner: name: ansible diff --git a/tasks/configure_kdump.yml b/tasks/configure_kdump.yml index 04448344ed0572a60f16dacfc7ea1ee0c7fc912e..472e3f2b1ebec5139331e51d364fe0527572e47e 100644 --- a/tasks/configure_kdump.yml +++ b/tasks/configure_kdump.yml @@ -7,7 +7,10 @@ # of the crash. Kernel core dumps may consume a considerable amount of disk # space and may result in denial of service by exhausting the available space # on the target file system partition." -- name: find out if kdump.service exists + +# This task uses the command module, because the systemd module would fail if +# the Service didn't exist. +- name: find out if kdump.service exists # noqa command-instead-of-module ansible.builtin.command: "systemctl list-unit-files kdump.service" register: kdump changed_when: false diff --git a/tasks/rosetta/install_error_summary.yml b/tasks/rosetta/install_error_summary.yml index bb8d5f615219b40d63b306fe8042de3fb0f79825..f58ec56e6d40bc13c1420294369b490cf57cac71 100644 --- a/tasks/rosetta/install_error_summary.yml +++ b/tasks/rosetta/install_error_summary.yml @@ -37,7 +37,7 @@ pattern: "error-summary.*" register: error_summary_units -- name: check if error summary units are already enabled +- name: check if error summary units are already enabled # noqa command-instead-of-module ansible.builtin.command: "systemctl is-enabled {{ item.path | basename }}" loop: "{{ error_summary_units.files }}" register: error_summary_enabled @@ -48,7 +48,7 @@ - '"No such file or directory" not in error_summary_enabled.stderr' - name: manually enable error_summary.service, because it cannot be found by the ansible.builtin.systemd module when the timer is located below "/etc/systemd/user/" - ansible.builtin.command: "systemctl enable {{ item.item.path }}" + ansible.builtin.command: "systemctl enable {{ item.item.path }}" # noqa command-instead-of-module loop: "{{ error_summary_enabled.results }}" when: - item.stdout != "enabled"