From 8dcd648f0bb744b8323a84324c9f4bc94ea38256 Mon Sep 17 00:00:00 2001 From: mg Date: Sat, 10 Jul 2021 12:51:41 +0200 Subject: [PATCH] header eingebaut (#149) header eingebaut Co-authored-by: Michael Grote Reviewed-on: https://git.mgrote.net/mg/ansible/pulls/149 Co-Authored-By: mg Co-Committed-By: mg --- roles/mgrote.acng/templates/security.conf | 1 + roles/mgrote.apt_manage_sources/templates/apt.conf | 1 + roles/mgrote.bdfr/templates/logrotate_config | 1 + roles/mgrote.cv4pve-autosnap/templates/logrotate_cv4pve | 1 + roles/mgrote.ecc-rasdaemon/templates/logrotate_rasdaemon | 1 + roles/mgrote.motd/templates/00-ansible-mgrote | 1 + roles/mgrote.motd/templates/05-fortune-mgrote | 1 + roles/mgrote.motd/templates/10-wetter-mgrote | 2 +- roles/mgrote.motd/templates/20-facts-mgrote | 1 + roles/mgrote.motd/templates/90-updates-mgrote | 2 +- roles/mgrote.motd/templates/91-reboot-mgrote | 2 +- roles/mgrote.munin-node/templates/plugin-conf.j2 | 1 + roles/mgrote.ntp_chrony_client/templates/logrotate_chrony | 1 + roles/mgrote.ntp_chrony_server/templates/logrotate_chrony | 1 + roles/mgrote.restic/templates/logrotate_restic | 1 + roles/mgrote.restic/templates/smb_password.txt | 1 + roles/mgrote.timeshift/templates/timeshift.json | 1 + roles/mgrote.zfs_sanoid/templates/logrotate_sanoid | 1 + 18 files changed, 18 insertions(+), 3 deletions(-) diff --git a/roles/mgrote.acng/templates/security.conf b/roles/mgrote.acng/templates/security.conf index 4f395c39..09f91d91 100644 --- a/roles/mgrote.acng/templates/security.conf +++ b/roles/mgrote.acng/templates/security.conf @@ -1,3 +1,4 @@ +{{ file_header | default () }} # This file contains confidential data and should be protected with file # permissions from being read by untrusted users. # diff --git a/roles/mgrote.apt_manage_sources/templates/apt.conf b/roles/mgrote.apt_manage_sources/templates/apt.conf index 39406272..d14f90cf 100644 --- a/roles/mgrote.apt_manage_sources/templates/apt.conf +++ b/roles/mgrote.apt_manage_sources/templates/apt.conf @@ -1,2 +1,3 @@ +{{ file_header | default () }} Acquire::http::proxy "http://{{ manage_sources_apt_proxy_server | default() }}:{{ manage_sources_apt_proxy_port | default() }}"; Acquire::https::proxy "http://{{ manage_sources_apt_proxy_server | default() }}:{{ manage_sources_apt_proxy_port | default() }}"; diff --git a/roles/mgrote.bdfr/templates/logrotate_config b/roles/mgrote.bdfr/templates/logrotate_config index ca37b7d1..e0caa767 100644 --- a/roles/mgrote.bdfr/templates/logrotate_config +++ b/roles/mgrote.bdfr/templates/logrotate_config @@ -1,3 +1,4 @@ +{{ file_header | default () }} {{ bdfr_log_file }} { missingok nocreate diff --git a/roles/mgrote.cv4pve-autosnap/templates/logrotate_cv4pve b/roles/mgrote.cv4pve-autosnap/templates/logrotate_cv4pve index 892a5133..ce4bf639 100644 --- a/roles/mgrote.cv4pve-autosnap/templates/logrotate_cv4pve +++ b/roles/mgrote.cv4pve-autosnap/templates/logrotate_cv4pve @@ -1,3 +1,4 @@ +{{ file_header | default () }} /var/log/cv4pve-autosnap.log { su root root create 0640 root root diff --git a/roles/mgrote.ecc-rasdaemon/templates/logrotate_rasdaemon b/roles/mgrote.ecc-rasdaemon/templates/logrotate_rasdaemon index 42c6445c..086a3e30 100644 --- a/roles/mgrote.ecc-rasdaemon/templates/logrotate_rasdaemon +++ b/roles/mgrote.ecc-rasdaemon/templates/logrotate_rasdaemon @@ -1,3 +1,4 @@ +{{ file_header | default () }} /var/log/rasdaemon.log { su root root create 0640 root root diff --git a/roles/mgrote.motd/templates/00-ansible-mgrote b/roles/mgrote.motd/templates/00-ansible-mgrote index 22e07075..1a285d03 100644 --- a/roles/mgrote.motd/templates/00-ansible-mgrote +++ b/roles/mgrote.motd/templates/00-ansible-mgrote @@ -1,4 +1,5 @@ #!/bin/sh +{{ file_header | default () }} echo "--------------------------------------------------------------------------------" echo " This system is managed by Ansible " echo "--------------------------------------------------------------------------------" diff --git a/roles/mgrote.motd/templates/05-fortune-mgrote b/roles/mgrote.motd/templates/05-fortune-mgrote index 7c73c4a1..517092c0 100644 --- a/roles/mgrote.motd/templates/05-fortune-mgrote +++ b/roles/mgrote.motd/templates/05-fortune-mgrote @@ -1,3 +1,4 @@ #!/bin/sh +{{ file_header | default () }} /usr/games/fortune -s echo "--------------------------------------------------------------------------------" diff --git a/roles/mgrote.motd/templates/10-wetter-mgrote b/roles/mgrote.motd/templates/10-wetter-mgrote index 8dd5704d..8dfd3cf8 100644 --- a/roles/mgrote.motd/templates/10-wetter-mgrote +++ b/roles/mgrote.motd/templates/10-wetter-mgrote @@ -1,5 +1,5 @@ #!/bin/bash - +{{ file_header | default () }} # NAME: now # PATH: $HOME/bin # DESC: Display current weather, calendar and time diff --git a/roles/mgrote.motd/templates/20-facts-mgrote b/roles/mgrote.motd/templates/20-facts-mgrote index 7ebaaa9b..92aa9f8b 100644 --- a/roles/mgrote.motd/templates/20-facts-mgrote +++ b/roles/mgrote.motd/templates/20-facts-mgrote @@ -1,4 +1,5 @@ #!/bin/sh +{{ file_header | default () }} echo "FQDN: {{ ansible_fqdn }}" echo "Distro: {{ ansible_distribution }} {{ ansible_distribution_version }} {{ ansible_distribution_release }}" echo "Virtual: {{ 'YES' if ansible_virtualization_role == 'guest' else 'NO' }}" diff --git a/roles/mgrote.motd/templates/90-updates-mgrote b/roles/mgrote.motd/templates/90-updates-mgrote index 539a67a5..906f16aa 100644 --- a/roles/mgrote.motd/templates/90-updates-mgrote +++ b/roles/mgrote.motd/templates/90-updates-mgrote @@ -1,5 +1,5 @@ #!/bin/sh - +{{ file_header | default () }} stamp="/var/lib/update-notifier/updates-available" ([ ! -r "$stamp" ] || [ -n "$(awk '/^0/{print $1;}' "$stamp")" ]) || cat "$stamp" diff --git a/roles/mgrote.motd/templates/91-reboot-mgrote b/roles/mgrote.motd/templates/91-reboot-mgrote index be8b476b..866fcdf3 100644 --- a/roles/mgrote.motd/templates/91-reboot-mgrote +++ b/roles/mgrote.motd/templates/91-reboot-mgrote @@ -1,5 +1,5 @@ #!/bin/sh - +{{ file_header | default () }} if [ -x /usr/lib/update-notifier/update-motd-reboot-required ]; then exec /usr/lib/update-notifier/update-motd-reboot-required fi diff --git a/roles/mgrote.munin-node/templates/plugin-conf.j2 b/roles/mgrote.munin-node/templates/plugin-conf.j2 index 90107fbe..7bd8b2f4 100644 --- a/roles/mgrote.munin-node/templates/plugin-conf.j2 +++ b/roles/mgrote.munin-node/templates/plugin-conf.j2 @@ -1,3 +1,4 @@ +{{ file_header | default () }} {% for section,directives in munin_node_config.items() | list %} [{{section}}] {% for name,val in directives.items() | list %} diff --git a/roles/mgrote.ntp_chrony_client/templates/logrotate_chrony b/roles/mgrote.ntp_chrony_client/templates/logrotate_chrony index 6c413ffb..86e0c1f6 100644 --- a/roles/mgrote.ntp_chrony_client/templates/logrotate_chrony +++ b/roles/mgrote.ntp_chrony_client/templates/logrotate_chrony @@ -1,3 +1,4 @@ +{{ file_header | default () }} /var/log/chrony/*.log { missingok nocreate diff --git a/roles/mgrote.ntp_chrony_server/templates/logrotate_chrony b/roles/mgrote.ntp_chrony_server/templates/logrotate_chrony index 6c413ffb..86e0c1f6 100644 --- a/roles/mgrote.ntp_chrony_server/templates/logrotate_chrony +++ b/roles/mgrote.ntp_chrony_server/templates/logrotate_chrony @@ -1,3 +1,4 @@ +{{ file_header | default () }} /var/log/chrony/*.log { missingok nocreate diff --git a/roles/mgrote.restic/templates/logrotate_restic b/roles/mgrote.restic/templates/logrotate_restic index a239ebe7..5fbaaf66 100644 --- a/roles/mgrote.restic/templates/logrotate_restic +++ b/roles/mgrote.restic/templates/logrotate_restic @@ -1,3 +1,4 @@ +{{ file_header | default () }} /var/log/restic.log { su root root create 0640 root root diff --git a/roles/mgrote.restic/templates/smb_password.txt b/roles/mgrote.restic/templates/smb_password.txt index 369a646e..7b576923 100644 --- a/roles/mgrote.restic/templates/smb_password.txt +++ b/roles/mgrote.restic/templates/smb_password.txt @@ -1,2 +1,3 @@ +{{ file_header | default () }} user={{ restic_mount_user }} password={{ restic_mount_password }} diff --git a/roles/mgrote.timeshift/templates/timeshift.json b/roles/mgrote.timeshift/templates/timeshift.json index 38e1b51e..af2fd8ab 100644 --- a/roles/mgrote.timeshift/templates/timeshift.json +++ b/roles/mgrote.timeshift/templates/timeshift.json @@ -1,3 +1,4 @@ +{{ file_header | default () }} { "backup_device_uuid" : "9b924961-0fd4-423f-b440-f2f3d1fa46d8", "parent_device_uuid" : "", diff --git a/roles/mgrote.zfs_sanoid/templates/logrotate_sanoid b/roles/mgrote.zfs_sanoid/templates/logrotate_sanoid index 0b595d15..a27710ad 100644 --- a/roles/mgrote.zfs_sanoid/templates/logrotate_sanoid +++ b/roles/mgrote.zfs_sanoid/templates/logrotate_sanoid @@ -1,3 +1,4 @@ +{{ file_header | default () }} /var/log/sanoid-cron.log { su root root create 0644 root root