From 854f0b99068eb1fd1e5616c1f7411cc1db43230b Mon Sep 17 00:00:00 2001 From: chapeau Date: Thu, 12 Sep 2024 13:45:57 +0200 Subject: [PATCH] Configure needrestart --- roles/basics/tasks/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/basics/tasks/main.yml b/roles/basics/tasks/main.yml index 927f931..9f662be 100644 --- a/roles/basics/tasks/main.yml +++ b/roles/basics/tasks/main.yml @@ -21,4 +21,9 @@ dest: ~/docker-apt-dater/hosts.d/host.xml run_once: True - \ No newline at end of file +- name: Automaticaly restart services when needed + lineinfile: + path: /etc/needrestart/needrestart.conf + regexp: '^\$nrconf{restart} =' + line: $nrconf{restart} = 'a'; + become: true \ No newline at end of file