Configure 'needrestart' package

This commit is contained in:
Danny Bessems 2022-10-10 16:05:48 +02:00
parent 3fe83457ea
commit 35a5656c59

View File

@ -1,3 +1,14 @@
- name: Configure 'needrestart' package
ansible.builtin.lineinfile:
path: /etc/needrestart/needrestart.conf
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
loop:
- regexp: "^#\\$nrconf\\{restart\\} = 'i';"
line: "$nrconf{restart} = 'a';"
- regexp: "^#\\$nrconf\\{kernelhints\\} = -1;"
line: "$nrconf{kernelhints} = -1;"
- name: Install additional packages
ansible.builtin.apt:
pkg: "{{ packages.apt }}"