Commit c4f93e55 authored by bgm's avatar bgm Committed by bgm
Browse files

ansible: sync common-all role with symbiotic

parent 5f95b044
---
# Adjust this to your needs
# If your infrastructure is dual-stack ipv6/ipv4, make sure to include all IPs.
ufw_munin_allow_src:
- 127.0.0.1
---
- name: restart ufw
service: name=ufw state=restarted
- name: restart rsyslog
service: name=rsyslog state=restarted
- name: refresh sysctl
shell: sysctl -p
......@@ -23,10 +23,8 @@
- less
- libpam-yubico
- ncdu
- ntpdate
- tmux
- ufw
- unattended-upgrades
- tree
- unzip
- vim
- vnstat
......@@ -37,6 +35,42 @@
- packages
- common-all
# KVM servers run openntpd; usually not recommended to install both.
- apt: name={{ item }} state=present install_recommends=no
with_items:
- ntpdate
when: "'kvm-servers' not in group_names"
tags:
- packages
- common-all
# Not required since Debian10
# - name: rsyslog | Deploy conf file to avoid annoying warnings
# template: src=etc/rsyslog.conf dest=/etc/rsyslog.conf owner=root group=root mode=0644
# notify: restart rsyslog
# tags:
# - common-all
# - common-all-rsyslog
- name: sysctl | Deploy custom sysctl settings
template: src=etc/sysctl.d/95-symbiotic.conf dest=/etc/sysctl.d/95-symbiotic.conf owner=root group=root mode=0644
notify: refresh sysctl
tags:
- common-all
- common-all-sysctl
- name: common | Deploy keyboard default conf
template: src=etc/default/keyboard dest=/etc/default/keyboard owner=root group=root mode=0644
tags:
- common-all
- name: network | Deploy IPv4 configuration
template: src=etc/network/interfaces dest=/etc/network/interfaces owner=root group=root mode=0644
when: preseed_ipv4_address is defined
tags:
- common-all
- common-all-ipv4
- name: network | Deploy IPv6 configuration script
template: src=etc/network/if-up.d/civicrm-ipv6 dest=/etc/network/if-up.d/civicrm-ipv6 owner=root group=root mode=0755
when: preseed_ipv6_address is defined
......
......@@ -2,5 +2,5 @@
deb http://ftp.ca.debian.org/debian/ {{ ansible_distribution_release }} main contrib
deb http://security.debian.org/ {{ ansible_distribution_release }}/updates main contrib
# stretch-updates, previously known as 'volatile'
# previously known as 'volatile'
deb http://ftp.ca.debian.org/debian/ {{ ansible_distribution_release }}-updates main
# {{ ansible_managed }}
#
# This is mostly required for kvm servers.
XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
# {{ ansible_managed }}
#
# For more information, see interfaces(5).
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
{% if preseed_ipv4_bridged_gateway is defined %}
allow-hotplug {{ preseed_network_interface }}
iface {{ preseed_network_interface }} inet static
address {{ preseed_ipv4_address }}/32
broadcast {{ preseed_ipv4_address }}
post-up /sbin/ip route add {{ preseed_ipv4_bridged_gateway }} dev {{ preseed_network_interface }}
post-up /sbin/ip route add default via {{ preseed_ipv4_bridged_gateway }} dev {{ preseed_network_interface }}
dns-nameservers 8.8.8.8
dns-search {{ preseed_domain }}
{% else %}
allow-hotplug {{ preseed_network_interface }}
iface {{ preseed_network_interface }} inet static
address {{ preseed_ipv4_address }}
netmask {{ preseed_ipv4_netmask }}
network {{ preseed_ipv4_network }}
broadcast {{ preseed_ipv4_broadcast }}
post-up /sbin/ip route add {{ preseed_ipv4_gateway }} dev {{ preseed_network_interface }}
post-up /sbin/ip route add default via {{ preseed_ipv4_gateway }} dev {{ preseed_network_interface }}
dns-nameservers 8.8.8.8
dns-search {{ preseed_domain }}
{% endif %}
# {{ ansible_managed }}
#
# /etc/rsyslog.conf Configuration file for rsyslog.
#
# For more information see
# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
#################
#### MODULES ####
#################
$ModLoad imuxsock # provides support for local system logging
$ModLoad imklog # provides kernel logging support
#$ModLoad immark # provides --MARK-- message capability
# provides UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514
# provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514
###########################
#### GLOBAL DIRECTIVES ####
###########################
#
# Use traditional timestamp format.
# To enable high precision timestamps, comment out the following line.
#
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
#
# Set the default permissions for all log files.
#
$FileOwner root
$FileGroup adm
$FileCreateMode 0640
$DirCreateMode 0755
$Umask 0022
#
# Where to place spool and state files
#
$WorkDirectory /var/spool/rsyslog
#
# Include all config files in /etc/rsyslog.d/
#
$IncludeConfig /etc/rsyslog.d/*.conf
###############
#### RULES ####
###############
#
# First some standard log files. Log by facility.
#
auth,authpriv.* /var/log/auth.log
*.*;auth,authpriv.none -/var/log/syslog
#cron.* /var/log/cron.log
daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log
lpr.* -/var/log/lpr.log
mail.* -/var/log/mail.log
user.* -/var/log/user.log
#
# Logging for the mail system. Split it up so that
# it is easy to write scripts to parse these files.
#
mail.info -/var/log/mail.info
mail.warn -/var/log/mail.warn
mail.err /var/log/mail.err
#
# Logging for INN news system.
#
news.crit /var/log/news/news.crit
news.err /var/log/news/news.err
news.notice -/var/log/news/news.notice
#
# Some "catch-all" log files.
#
*.=debug;\
auth,authpriv.none;\
news.none;mail.none -/var/log/debug
*.=info;*.=notice;*.=warn;\
auth,authpriv.none;\
cron,daemon.none;\
mail,news.none -/var/log/messages
#
# Emergencies are sent to everybody logged in.
#
*.emerg :omusrmsg:*
#
# I like to have messages displayed on the console, but only on a virtual
# console I usually leave idle.
#
#daemon,mail.*;\
# news.=crit;news.=err;news.=notice;\
# *.=debug;*.=info;\
# *.=notice;*.=warn /dev/tty8
# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
# you must invoke `xconsole' with the `-file' option:
#
# $ xconsole -file /dev/xconsole [...]
#
# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
# busy site..
#
# [ML] SYMBIOTIC
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=783687
#
# daemon.*;mail.*;\
# news.err;\
# *.=debug;*.=info;\
# *.=notice;*.=warn |/dev/xconsole
# {{ ansible_managed }}
# https://askubuntu.com/questions/118273/what-are-icmp-redirects-and-should-they-be-blocked
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
net.ipv6.conf.default.accept_redirects = 0
net.ipv6.conf.all.secure_redirects = 0
net.ipv6.conf.default.secure_redirects = 0
# http://www.forensicswiki.org/wiki/TCP_timestamps
net.ipv4.tcp_timestamps=0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment