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:
parent
221abf4050
commit
e4e84d2218
29 changed files with 35 additions and 4 deletions
|
@ -1,6 +1,10 @@
|
||||||
---
|
---
|
||||||
### wird in vielen Rollen verwendet
|
### wird in vielen Rollen verwendet
|
||||||
empfaenger_mail: michael.grote@posteo.de
|
empfaenger_mail: michael.grote@posteo.de
|
||||||
|
file_header: |
|
||||||
|
#------------------------------------------------------------------
|
||||||
|
#- This file is managed with ansible! -
|
||||||
|
#------------------------------------------------------------------
|
||||||
### mgrote.postfix
|
### mgrote.postfix
|
||||||
postfix_absender_mailadresse: info@mgrote.net
|
postfix_absender_mailadresse: info@mgrote.net
|
||||||
postfix_absender_passwort: "{{ lookup('keepass', 'postfix_absender_passwort', 'password') }}"
|
postfix_absender_passwort: "{{ lookup('keepass', 'postfix_absender_passwort', 'password') }}"
|
||||||
|
@ -88,7 +92,7 @@
|
||||||
### mgrote.apt_install_packages
|
### mgrote.apt_install_packages
|
||||||
programs_common:
|
programs_common:
|
||||||
- locales
|
- locales
|
||||||
- python
|
- python3
|
||||||
- build-essential
|
- build-essential
|
||||||
- ntp
|
- ntp
|
||||||
- htop
|
- htop
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
# This is a configuration file for apt-cacher-ng, a smart caching proxy for
|
# 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
|
# 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.
|
# the -c option of apt-cacher-ng, see apt-cacher-ng(8) for details.
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
#!@SCRIPTSHELL@
|
#!@SCRIPTSHELL@
|
||||||
#
|
#
|
||||||
# Safe apccontrol for testing.
|
# Safe apccontrol for testing.
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
## apcupsd.conf v1.1 ##
|
## apcupsd.conf v1.1 ##
|
||||||
UPSCABLE usb
|
UPSCABLE usb
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
## apcupsd.conf v1.1 ##
|
## apcupsd.conf v1.1 ##
|
||||||
|
|
||||||
UPSCABLE ether
|
UPSCABLE ether
|
||||||
|
|
|
@ -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}} 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}}-updates main restricted
|
||||||
deb http://{{ manage_sources_apt_proxy_url }}/de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}} universe
|
deb http://{{ manage_sources_apt_proxy_url }}/de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}} universe
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
# Generated by /usr/bin/select-editor
|
{{ file_header | default () }}
|
||||||
SELECTED_EDITOR="/usr/bin/vim"
|
SELECTED_EDITOR="/usr/bin/vim"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
{{ file_header | default () }}
|
||||||
LOCKDIR=${HOME}/.cache
|
LOCKDIR=${HOME}/.cache
|
||||||
function exlock() {
|
function exlock() {
|
||||||
exec {lock_fd}>${LOCKDIR}/$(basename $0).lock
|
exec {lock_fd}>${LOCKDIR}/$(basename $0).lock
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
# The ServerName directive sets the request scheme, hostname and port that
|
# The ServerName directive sets the request scheme, hostname and port that
|
||||||
# the server uses to identify itself. This is used when creating
|
# the server uses to identify itself. This is used when creating
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
# This is the main Apache server configuration file. It contains the
|
# This is the main Apache server configuration file. It contains the
|
||||||
# configuration directives that give the server its instructions.
|
# configuration directives that give the server its instructions.
|
||||||
# See http://httpd.apache.org/docs/2.4/ for detailed information about
|
# See http://httpd.apache.org/docs/2.4/ for detailed information about
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
{{ file_header | default () }}
|
||||||
#####################
|
#####################
|
||||||
## https://www.tothenew.com/blog/foolproof-your-bash-script-some-best-practices/
|
## https://www.tothenew.com/blog/foolproof-your-bash-script-some-best-practices/
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
ignorself = true
|
ignorself = true
|
||||||
ignoreip = 127.0.0.1/8 ::1
|
ignoreip = 127.0.0.1/8 ::1
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
[Definition]
|
[Definition]
|
||||||
actionstart =
|
actionstart =
|
||||||
actionstop =
|
actionstop =
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
#======================= Global Settings =======================
|
#======================= Global Settings =======================
|
||||||
[global]
|
[global]
|
||||||
min protocol = {{ smb_min_protocol }}
|
min protocol = {{ smb_min_protocol }}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
{% for item in cifs_mounts %}
|
{% for item in cifs_mounts %}
|
||||||
username={{ item.user }}
|
username={{ item.user }}
|
||||||
password={{ item.password }}
|
password={{ item.password }}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
{{ file_header | default () }}
|
||||||
#####################
|
#####################
|
||||||
## https://www.tothenew.com/blog/foolproof-your-bash-script-some-best-practices/
|
## https://www.tothenew.com/blog/foolproof-your-bash-script-some-best-practices/
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
# Servers
|
# Servers
|
||||||
{% for item in ntp_servers %}
|
{% for item in ntp_servers %}
|
||||||
server {{ item.address }} {{ item.options |default() }}
|
server {{ item.address }} {{ item.options |default() }}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
relayhost = [{{ postfix_smtp_server }}]:{{ postfix_smtp_server_port }}
|
relayhost = [{{ postfix_smtp_server }}]:{{ postfix_smtp_server_port }}
|
||||||
smtp_use_tls = {{ postfix_smtp_use_tls }}
|
smtp_use_tls = {{ postfix_smtp_use_tls }}
|
||||||
smtp_sasl_auth_enable = {{ postfix_smtp_sasl_auth_enable }}
|
smtp_sasl_auth_enable = {{ postfix_smtp_sasl_auth_enable }}
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
{{ postfix_smtp_server }} {{ postfix_absender_mailadresse }}:{{ postfix_absender_passwort }}
|
{{ postfix_smtp_server }} {{ postfix_absender_mailadresse }}:{{ postfix_absender_passwort }}
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
/.+/ {{ postfix_absender_mailadresse }}
|
/.+/ {{ postfix_absender_mailadresse }}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
{{ file_header | default () }}
|
||||||
LOCKDIR=${HOME}/.cache # set lockdir
|
LOCKDIR=${HOME}/.cache # set lockdir
|
||||||
function exlock() { # define Function for setting lock; stops the script i a lock exists
|
function exlock() { # define Function for setting lock; stops the script i a lock exists
|
||||||
exec {lock_fd}>${LOCKDIR}/$(basename $0).lock
|
exec {lock_fd}>${LOCKDIR}/$(basename $0).lock
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
{{ file_header | default () }}
|
||||||
for i in {a..z}; do
|
for i in {a..z}; do
|
||||||
smartctl /dev/sd$i -a | grep "Device Model: "
|
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"
|
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"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
{{ file_header | default () }}
|
||||||
for i in {a..z}; do
|
for i in {a..z}; do
|
||||||
{{ smart_smartctl_mail_pfad_smartctl }} /dev/sd$i -a
|
{{ smart_smartctl_mail_pfad_smartctl }} /dev/sd$i -a
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
|
|
||||||
# Reihenfolge der Zeilen ist wichtig
|
# Reihenfolge der Zeilen ist wichtig
|
||||||
|
|
||||||
# Mail nach Neustart
|
# Mail nach Neustart
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
{{ file_header | default () }}
|
||||||
|
|
||||||
problems=0
|
problems=0
|
||||||
emailSubject="`hostname` - ZFS pool - HEALTH check"
|
emailSubject="`hostname` - ZFS pool - HEALTH check"
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
#! /bin/bash
|
#! /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'"
|
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'"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
{{ file_header | default () }}
|
||||||
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
LOCKDIR=${HOME}/.cache
|
LOCKDIR=${HOME}/.cache
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
## ZFS Section -------------------------------- ##
|
## ZFS Section -------------------------------- ##
|
||||||
{% for item in sanoid_datasets %}
|
{% for item in sanoid_datasets %}
|
||||||
[{{ item.path }}]
|
[{{ item.path }}]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
##
|
##
|
||||||
# zed.rc
|
# zed.rc
|
||||||
#
|
#
|
||||||
# This file should be owned by root and permissioned 0600.
|
# This file should be owned by root and permissioned 0600.
|
||||||
##
|
##
|
||||||
|
|
||||||
##
|
##
|
||||||
# Absolute path to the debug output file.
|
# Absolute path to the debug output file.
|
||||||
|
|
Loading…
Reference in a new issue