diff --git a/defaults/main.yml b/defaults/main.yml index fd5711d..fc17cf2 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -31,6 +31,12 @@ needrestart_blacklist_rc: [] # - /opt/.*/java needrestart_blacklist_bin: [] +# Blacklist files as regex +# Example: +# needrestart_blacklist_interp: +# - /nexus-data/.*/bundle.jar +needrestart_blacklist_interp: [] + # needrestart check_mk related needrestart_checkmk_localcheckdir: /usr/lib/check_mk_agent/local needrestart_checkmk_localcheck: False diff --git a/templates/needrestart_blacklist.conf.j2 b/templates/needrestart_blacklist.conf.j2 index 76c8d12..262d8ab 100644 --- a/templates/needrestart_blacklist.conf.j2 +++ b/templates/needrestart_blacklist.conf.j2 @@ -18,3 +18,10 @@ push ( @{$nrconf{blacklist_rc}}, ( ) ); +#Blacklist script files +push ( @{$nrconf{blacklist_interp}}, ( +{% for blacklistinterp in needrestart_blacklist_interp %} + qr(^{{ blacklistinterp }}$), +{% endfor %} + ) +);