Refactor Ansible tasks and templates for improved consistency and clarity
This commit is contained in:
@@ -177,8 +177,8 @@ HostbasedAuthentication no
|
||||
# The allow/deny directives are processed in the following order: DenyUsers,
|
||||
# AllowUsers, DenyGroups, and finally AllowGroups.
|
||||
# By default, login is allowed for all users.
|
||||
{% if (fact_sshd_allowed_users is defined) and fact_sshd_allowed_users %}
|
||||
AllowUsers {{ fact_sshd_allowed_users }}
|
||||
{% if (common_fact_sshd_allowed_users is defined) and common_fact_sshd_allowed_users %}
|
||||
AllowUsers {{ common_fact_sshd_allowed_users }}
|
||||
{% else %}
|
||||
#AllowUsers back chris sysadm cityslang christoph
|
||||
{% endif %}
|
||||
@@ -239,8 +239,8 @@ UsePAM {{ sshd_use_pam }}
|
||||
#
|
||||
# The list of available key exchange algorithms may also be obtained using "ssh -Q kex".
|
||||
#
|
||||
{% if (fact_sshd_kexalgorithms is defined) and fact_sshd_kexalgorithms %}
|
||||
KexAlgorithms {{ fact_sshd_kexalgorithms }}
|
||||
{% if (common_fact_sshd_kexalgorithms is defined) and common_fact_sshd_kexalgorithms %}
|
||||
KexAlgorithms {{ common_fact_sshd_kexalgorithms }}
|
||||
{% else %}
|
||||
#KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
|
||||
{% endif %}
|
||||
@@ -273,8 +273,8 @@ KexAlgorithms {{ fact_sshd_kexalgorithms }}
|
||||
#
|
||||
# The list of available ciphers may also be obtained using "ssh -Q cipher".
|
||||
#
|
||||
{% if (fact_sshd_ciphers is defined) and fact_sshd_ciphers %}
|
||||
Ciphers {{ fact_sshd_ciphers }}
|
||||
{% if (common_fact_sshd_ciphers is defined) and common_fact_sshd_ciphers %}
|
||||
Ciphers {{ common_fact_sshd_ciphers }}
|
||||
{% else %}
|
||||
#Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes256-ctr
|
||||
{% endif %}
|
||||
@@ -317,8 +317,8 @@ Ciphers {{ fact_sshd_ciphers }}
|
||||
#
|
||||
# The list of available MAC algorithms may also be obtained using "ssh -Q mac".
|
||||
#
|
||||
{% if (fact_sshd_macs is defined) and fact_sshd_macs %}
|
||||
MACs {{ fact_sshd_macs }}
|
||||
{% if (common_fact_sshd_macs is defined) and common_fact_sshd_macs %}
|
||||
MACs {{ common_fact_sshd_macs }}
|
||||
{% else %}
|
||||
#MACs umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,mac-sha2-256,hmac-sha2-512,hmac-sha1
|
||||
{% endif %}
|
||||
@@ -337,8 +337,8 @@ MACs {{ fact_sshd_macs }}
|
||||
# ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
|
||||
#
|
||||
# The list of available key types may also be obtained using "ssh -Q key".
|
||||
{% if (fact_sshd_hostkeyalgorithms is defined) and fact_sshd_hostkeyalgorithms %}
|
||||
HostKeyAlgorithms {{ fact_sshd_hostkeyalgorithms }}
|
||||
{% if (common_fact_sshd_hostkeyalgorithms is defined) and common_fact_sshd_hostkeyalgorithms %}
|
||||
HostKeyAlgorithms {{ common_fact_sshd_hostkeyalgorithms }}
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
@@ -171,8 +171,8 @@ HostbasedAuthentication no
|
||||
# The allow/deny directives are processed in the following order: DenyUsers,
|
||||
# AllowUsers, DenyGroups, and finally AllowGroups.
|
||||
# By default, login is allowed for all users.
|
||||
{% if (fact_sshd_allowed_users is defined) and fact_sshd_allowed_users %}
|
||||
AllowUsers {{ fact_sshd_allowed_users }}
|
||||
{% if (common_fact_sshd_allowed_users is defined) and common_fact_sshd_allowed_users %}
|
||||
AllowUsers {{ common_fact_sshd_allowed_users }}
|
||||
{% else %}
|
||||
#AllowUsers back chris sysadm cityslang christoph
|
||||
{% endif %}
|
||||
|
||||
@@ -5,20 +5,20 @@
|
||||
# *** ---------------------------------------------- ***
|
||||
|
||||
[Resolve]
|
||||
{% if (fact_resolved_nameserver is defined) and fact_resolved_nameserver %}
|
||||
DNS={{ fact_resolved_nameserver}}
|
||||
{% if (common_fact_resolved_nameserver is defined) and common_fact_resolved_nameserver %}
|
||||
DNS={{ common_fact_resolved_nameserver }}
|
||||
{% else %}
|
||||
#DNS=
|
||||
{% endif -%}
|
||||
|
||||
{% if (fact_resolved_fallback_nameserver is defined) and fact_resolved_fallback_nameserver %}
|
||||
FallbackDNS={{ fact_resolved_fallback_nameserver }}
|
||||
{% if (common_fact_resolved_fallback_nameserver is defined) and common_fact_resolved_fallback_nameserver %}
|
||||
FallbackDNS={{ common_fact_resolved_fallback_nameserver }}
|
||||
{% else %}
|
||||
#FallbackDNS=
|
||||
{% endif -%}
|
||||
|
||||
{% if (fact_resolved_domains is defined) and fact_resolved_domains %}
|
||||
Domains={{ fact_resolved_domains }}
|
||||
{% if (common_fact_resolved_domains is defined) and common_fact_resolved_domains %}
|
||||
Domains={{ common_fact_resolved_domains }}
|
||||
{% else %}
|
||||
#Domains=
|
||||
{% endif -%}
|
||||
|
||||
Reference in New Issue
Block a user