templates: Header-Var eingefügt (#22)

python zu 3

rest

zfs

Postfix

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#22
Co-Authored-By: mg <mg@noreply.git.mgrote.net>
Co-Committed-By: mg <mg@noreply.git.mgrote.net>
This commit is contained in:
Michael Grote 2021-03-07 19:40:32 +01:00
parent 221abf4050
commit e4e84d2218
29 changed files with 35 additions and 4 deletions

View file

@ -1,6 +1,10 @@
---
### wird in vielen Rollen verwendet
empfaenger_mail: michael.grote@posteo.de
file_header: |
#------------------------------------------------------------------
#- This file is managed with ansible! -
#------------------------------------------------------------------
### mgrote.postfix
postfix_absender_mailadresse: info@mgrote.net
postfix_absender_passwort: "{{ lookup('keepass', 'postfix_absender_passwort', 'password') }}"
@ -88,7 +92,7 @@
### mgrote.apt_install_packages
programs_common:
- locales
- python
- python3
- build-essential
- ntp
- htop

View file

@ -1,3 +1,4 @@
{{ file_header | default () }}
# This is a configuration file for apt-cacher-ng, a smart caching proxy for
# software package downloads. It's supposed to be in a directory specified by
# the -c option of apt-cacher-ng, see apt-cacher-ng(8) for details.

View file

@ -1,3 +1,4 @@
{{ file_header | default () }}
#!@SCRIPTSHELL@
#
# Safe apccontrol for testing.

View file

@ -1,3 +1,4 @@
{{ file_header | default () }}
## apcupsd.conf v1.1 ##
UPSCABLE usb

View file

@ -1,3 +1,4 @@
{{ file_header | default () }}
## apcupsd.conf v1.1 ##
UPSCABLE ether

View file

@ -1,3 +1,4 @@
{{ file_header | default () }}
deb http://{{ manage_sources_apt_proxy_url }}/de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}} main restricted
deb http://{{ manage_sources_apt_proxy_url }}/de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}}-updates main restricted
deb http://{{ manage_sources_apt_proxy_url }}/de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}} universe

View file

@ -1,2 +1,2 @@
# Generated by /usr/bin/select-editor
{{ file_header | default () }}
SELECTED_EDITOR="/usr/bin/vim"

View file

@ -1,4 +1,5 @@
#!/bin/bash
{{ file_header | default () }}
LOCKDIR=${HOME}/.cache
function exlock() {
exec {lock_fd}>${LOCKDIR}/$(basename $0).lock

View file

@ -1,3 +1,4 @@
{{ file_header | default () }}
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating

View file

@ -1,3 +1,4 @@
{{ file_header | default () }}
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about

View file

@ -1,4 +1,5 @@
#!/bin/bash
{{ file_header | default () }}
#####################
## https://www.tothenew.com/blog/foolproof-your-bash-script-some-best-practices/
set -o nounset

View file

@ -1,3 +1,4 @@
{{ file_header | default () }}
[DEFAULT]
ignorself = true
ignoreip = 127.0.0.1/8 ::1

View file

@ -1,3 +1,4 @@
{{ file_header | default () }}
[Definition]
actionstart =
actionstop =

View file

@ -1,3 +1,4 @@
{{ file_header | default () }}
#======================= Global Settings =======================
[global]
min protocol = {{ smb_min_protocol }}

View file

@ -1,3 +1,4 @@
{{ file_header | default () }}
{% for item in cifs_mounts %}
username={{ item.user }}
password={{ item.password }}

View file

@ -1,4 +1,5 @@
#!/bin/bash
{{ file_header | default () }}
#####################
## https://www.tothenew.com/blog/foolproof-your-bash-script-some-best-practices/
set -o nounset

View file

@ -1,3 +1,4 @@
{{ file_header | default () }}
# Servers
{% for item in ntp_servers %}
server {{ item.address }} {{ item.options |default() }}

View file

@ -1,3 +1,4 @@
{{ file_header | default () }}
relayhost = [{{ postfix_smtp_server }}]:{{ postfix_smtp_server_port }}
smtp_use_tls = {{ postfix_smtp_use_tls }}
smtp_sasl_auth_enable = {{ postfix_smtp_sasl_auth_enable }}

View file

@ -1 +1,2 @@
{{ file_header | default () }}
{{ postfix_smtp_server }} {{ postfix_absender_mailadresse }}:{{ postfix_absender_passwort }}

View file

@ -1 +1,2 @@
{{ file_header | default () }}
/.+/ {{ postfix_absender_mailadresse }}

View file

@ -1,4 +1,5 @@
#!/bin/bash
{{ file_header | default () }}
LOCKDIR=${HOME}/.cache # set lockdir
function exlock() { # define Function for setting lock; stops the script i a lock exists
exec {lock_fd}>${LOCKDIR}/$(basename $0).lock

View file

@ -1,4 +1,5 @@
#!/bin/bash
{{ file_header | default () }}
for i in {a..z}; do
smartctl /dev/sd$i -a | grep "Device Model: "
smartctl /dev/sd$i -a | grep "SMART overall-health self-assessment test result: " | sed -r 's/SMART overall-health self-assessment test result: /SMART test result: /g'| sed -r "s/(PASSED)/`printf "\033[92m"`\1`printf "\033[0m"`/g" | sed -r "s/(FAILED)/`printf "\033[31m"`\1`printf "\033[0m"`/g"

View file

@ -1,4 +1,5 @@
#!/bin/bash
{{ file_header | default () }}
for i in {a..z}; do
{{ smart_smartctl_mail_pfad_smartctl }} /dev/sd$i -a
done

View file

@ -1,3 +1,5 @@
{{ file_header | default () }}
# Reihenfolge der Zeilen ist wichtig
# Mail nach Neustart

View file

@ -1,4 +1,5 @@
#! /bin/bash
{{ file_header | default () }}
problems=0
emailSubject="`hostname` - ZFS pool - HEALTH check"

View file

@ -1,2 +1,3 @@
#! /bin/bash
{{ file_header | default () }}
watch --interval 60 --differences --color --no-title "sudo zfs list -o space | grep -v / | tr -s ' ' | cut --delimiter=' ' --fields=1-3 | sed -r 's/\s/\t\t/g;s/NAME/NAME\t/g'"

View file

@ -1,4 +1,5 @@
#!/bin/bash
{{ file_header | default () }}
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LOCKDIR=${HOME}/.cache

View file

@ -1,3 +1,4 @@
{{ file_header | default () }}
## ZFS Section -------------------------------- ##
{% for item in sanoid_datasets %}
[{{ item.path }}]

View file

@ -1,9 +1,9 @@
{{ file_header | default () }}
##
# zed.rc
#
# This file should be owned by root and permissioned 0600.
##
##
##
# Absolute path to the debug output file.