add files and templates for common/deploy.py

This commit is contained in:
2e20 2024-10-07 06:03:51 +02:00
parent 1967a627ba
commit f972b2625f
5 changed files with 140 additions and 0 deletions

99
files/common/aliases Normal file
View file

@ -0,0 +1,99 @@
#
# $OpenBSD: aliases,v 1.68 2020/01/24 06:17:37 tedu Exp $
#
# Aliases in this file will NOT be expanded in the header from
# Mail, but WILL be visible over networks or from /usr/libexec/mail.local.
#
# >>>>>>>>>> The program "newaliases" must be run after
# >> NOTE >> this file is updated for any changes to
# >>>>>>>>>> show through to smtpd.
#
# Basic system aliases -- these MUST be present
MAILER-DAEMON: postmaster
postmaster: root
# General redirections for important pseudo accounts
daemon: root
ftp-bugs: root
operator: root
www: root
# Redirections for pseudo accounts that should not receive mail
_bgpd: /dev/null
_dhcp: /dev/null
_dpb: /dev/null
_dvmrpd: /dev/null
_eigrpd: /dev/null
_file: /dev/null
_fingerd: /dev/null
_ftp: /dev/null
_hostapd: /dev/null
_identd: /dev/null
_iked: /dev/null
_isakmpd: /dev/null
_iscsid: /dev/null
_ldapd: /dev/null
_ldpd: /dev/null
_mopd: /dev/null
_nsd: /dev/null
_ntp: /dev/null
_ospfd: /dev/null
_ospf6d: /dev/null
_pbuild: /dev/null
_pfetch: /dev/null
_pflogd: /dev/null
_ping: /dev/null
_pkgfetch: /dev/null
_pkguntar: /dev/null
_portmap: /dev/null
_ppp: /dev/null
_rad: /dev/null
_radiusd: /dev/null
_rbootd: /dev/null
_relayd: /dev/null
_ripd: /dev/null
_rstatd: /dev/null
_rusersd: /dev/null
_rwalld: /dev/null
_smtpd: /dev/null
_smtpq: /dev/null
_sndio: /dev/null
_snmpd: /dev/null
_spamd: /dev/null
_switchd: /dev/null
_syslogd: /dev/null
_tcpdump: /dev/null
_traceroute: /dev/null
_tftpd: /dev/null
_unbound: /dev/null
_unwind: /dev/null
_vmd: /dev/null
_x11: /dev/null
_ypldap: /dev/null
bin: /dev/null
build: /dev/null
nobody: /dev/null
_tftp_proxy: /dev/null
_ftp_proxy: /dev/null
_sndiop: /dev/null
_syspatch: /dev/null
_slaacd: /dev/null
sshd: /dev/null
# Well-known aliases -- these should be filled in!
root: servers@schleuder.0x90.space
# manager:
# dumper:
# RFC 2142: NETWORK OPERATIONS MAILBOX NAMES
abuse: root
noc: root
security: root
# RFC 2142: SUPPORT MAILBOX NAMES FOR SPECIFIC INTERNET SERVICES
hostmaster: root
# usenet: root
# news: usenet
webmaster: root
# ftp: root

View file

@ -0,0 +1,9 @@
Host cyberbackup
Hostname 192.168.223.3
Port 42022
User tech
Host nephilim
Hostname 192.168.223.5
Port 22
User nathan

View file

@ -0,0 +1,16 @@
127.0.0.1 localhost
::1 localhost
192.168.45.3 cyberbackup
{% for hypervisor in groups['openbsd_hypervisor'] %}
192.168.{{ hostvars[hypervisor]['network_nr'] }}.1 {{ hypervisor }}.0x90.space {{ hypervisor }}
{{ hostvars[hypervisor]['ip6_prefix'] }}::1 {{ hypervisor }}.0x90.space {{ hypervisor }}
{% endfor %}
{% for vm in groups['openbsd_vm'] %}
{% if destroy is not defined or vm != destroy %}
192.168.{{ hostvars[hostvars[vm]['hypervisor']]['network_nr'] }}.{{ hostvars[vm]['host_nr'] }} {{ vm }}.0x90.space {{ vm }}
{{ hostvars[hostvars[vm]['hypervisor']]['ip6_prefix'] }}:fce1:baff:fed0:{{ hostvars[vm]['host_nr'] }} {{ vm }}.0x90.space {{ vm }}
{% endif %}
{% endfor %}
{% for machine in groups['vpn_hosts'] %}
192.168.{{ hostvars[hostvars[machine]['jumphost']]['vpn_network_nr'] }}.{{ hostvars[machine]['host_nr'] }} {{ machine }}
{% endfor %}

View file

@ -0,0 +1 @@
{{ inventory_hostname }}.0x90.space

View file

@ -0,0 +1,15 @@
# $OpenBSD: smtpd.conf,v 1.12 2019/07/24 15:31:53 kmos Exp $
# This is the smtpd server system-wide configuration file.
# See smtpd.conf(5) for more information.
table aliases file:/etc/mail/aliases
listen on all
action "local_mail" mbox alias <aliases>
action "outbound" relay host "relay.0x90.space"
match from any for domain "{{ inventory_hostname }}.0x90.space" action "local_mail"
match from local for local action "local_mail"
match from local for any action "outbound"