aboutsummaryrefslogtreecommitdiff
path: root/roles/base/templates
diff options
context:
space:
mode:
authorLibravatar Martin Michalec <martin@michalec.dev>2026-10-22 20:03:44 +0000
committerLibravatar Martin Michalec <martin@michalec.dev>2026-10-22 20:03:44 +0000
commit4bab7edf283d1357816cbbf7a6b94e0280f1078f (patch)
treed684b067337a35c2e26a1145c470989698330fbb /roles/base/templates
downloadinfra-4bab7edf283d1357816cbbf7a6b94e0280f1078f.tar.gz
chore: setup ansible
Diffstat (limited to 'roles/base/templates')
-rw-r--r--roles/base/templates/repositories.j24
-rw-r--r--roles/base/templates/resolv.conf.j24
-rw-r--r--roles/base/templates/sshd_config.j2123
3 files changed, 131 insertions, 0 deletions
diff --git a/roles/base/templates/repositories.j2 b/roles/base/templates/repositories.j2
new file mode 100644
index 0000000..096e267
--- /dev/null
+++ b/roles/base/templates/repositories.j2
@@ -0,0 +1,4 @@
1# {{ ansible_managed }}
2{% for repo in repositories %}
3{{ repo }}
4{% endfor %}
diff --git a/roles/base/templates/resolv.conf.j2 b/roles/base/templates/resolv.conf.j2
new file mode 100644
index 0000000..b3de7ba
--- /dev/null
+++ b/roles/base/templates/resolv.conf.j2
@@ -0,0 +1,4 @@
1# {{ ansible_managed }}
2{% for ns in nameservers %}
3nameserver {{ ns }}
4{% endfor %}
diff --git a/roles/base/templates/sshd_config.j2 b/roles/base/templates/sshd_config.j2
new file mode 100644
index 0000000..dc5029d
--- /dev/null
+++ b/roles/base/templates/sshd_config.j2
@@ -0,0 +1,123 @@
1# {{ ansible_managed }}
2
3# This sshd was compiled with PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
4
5# The strategy used for options in the default sshd_config shipped with
6# OpenSSH is to specify options with their default value where
7# possible, but leave them commented. Uncommented options override the
8# default value.
9
10# Include configuration snippets before processing this file to allow the
11# snippets to override directives set in this file.
12Include /etc/ssh/sshd_config.d/*.conf
13
14#Port 22
15#AddressFamily any
16#ListenAddress 0.0.0.0
17#ListenAddress ::
18
19#HostKey /etc/ssh/ssh_host_rsa_key
20#HostKey /etc/ssh/ssh_host_ecdsa_key
21#HostKey /etc/ssh/ssh_host_ed25519_key
22#HostKey /etc/ssh/ssh_host_mldsa44_ed25519_key
23
24# Ciphers and keying
25#RekeyLimit default none
26
27# Logging
28#SyslogFacility AUTH
29#LogLevel INFO
30
31# Authentication:
32
33#LoginGraceTime 2m
34PermitRootLogin no
35#StrictModes yes
36#MaxAuthTries 6
37#MaxSessions 10
38
39#PubkeyAuthentication yes
40
41# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
42# but this is overridden so installations will only check .ssh/authorized_keys
43AuthorizedKeysFile .ssh/authorized_keys
44
45#AuthorizedPrincipalsFile none
46
47#AuthorizedKeysCommand none
48#AuthorizedKeysCommandUser nobody
49
50# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
51#HostbasedAuthentication no
52# Change to yes if you don't trust ~/.ssh/known_hosts for
53# HostbasedAuthentication
54#IgnoreUserKnownHosts no
55# Don't read the user's ~/.rhosts and ~/.shosts files
56#IgnoreRhosts yes
57
58# To disable tunneled clear text passwords, change to "no" here!
59PasswordAuthentication no
60#PermitEmptyPasswords no
61
62# Change to "no" to disable keyboard-interactive authentication. Depending on
63# the system's configuration, this may involve passwords, challenge-response,
64# one-time passwords or some combination of these and other methods.
65KbdInteractiveAuthentication no
66
67# Kerberos options
68#KerberosAuthentication no
69#KerberosOrLocalPasswd yes
70#KerberosTicketCleanup yes
71#KerberosGetAFSToken no
72
73# GSSAPI options
74#GSSAPIAuthentication no
75#GSSAPICleanupCredentials yes
76
77# Set this to 'yes' to enable PAM authentication, account processing,
78# and session processing. If this is enabled, PAM authentication will
79# be allowed through the KbdInteractiveAuthentication and
80# PasswordAuthentication. Depending on your PAM configuration,
81# PAM authentication via KbdInteractiveAuthentication may bypass
82# the setting of "PermitRootLogin prohibit-password".
83# If you just want the PAM account and session checks to run without
84# PAM authentication, then enable this but set PasswordAuthentication
85# and KbdInteractiveAuthentication to 'no'.
86#UsePAM no
87
88#AllowAgentForwarding yes
89# Feel free to re-enable these if your use case requires them.
90AllowTcpForwarding yes
91GatewayPorts yes
92X11Forwarding no
93#X11DisplayOffset 10
94#X11UseLocalhost yes
95#PermitTTY yes
96#PrintMotd yes
97#PrintLastLog yes
98#TCPKeepAlive yes
99#PermitUserEnvironment no
100#Compression delayed
101#ClientAliveInterval 0
102#ClientAliveCountMax 3
103#UseDNS no
104#PidFile /run/sshd.pid
105#MaxStartups 10:30:100
106#PermitTunnel no
107#ChrootDirectory none
108#VersionAddendum none
109
110# no default banner path
111#Banner none
112
113# override default of no subsystems
114Subsystem sftp internal-sftp
115
116# Example of overriding settings on a per-user basis
117#Match User anoncvs
118# X11Forwarding no
119# AllowTcpForwarding no
120# PermitTTY no
121# ForceCommand cvs server
122
123Include /etc/ssh/sshd_config.d/andr/config