refactor!: switch hosts variables to a flat layout

This commit is contained in:
NaeiKinDus 2024-01-21 00:00:00 +00:00
parent f669dea62a
commit 779f2766f2
Signed by: WoodSmellParticle
GPG key ID: 8E52ADFF7CA8AE56
33 changed files with 270 additions and 322 deletions

View file

@ -1,22 +1,22 @@
[user]
name = {{ common.git.username }}
email = {{ common.git.email }}
{% if common.git.force_sign and common.git.signing_key %}
signingkey = {{ common.git.signing_key }}
{% endif %}
name = {{ common_git_username }}
email = {{ common_git_email }}
{%- if common_git_force_sign and common_git_signing_key +%}
signingkey = {{ common_git_signing_key }}
{%- endif +%}
[commit]
{% if common.git.force_sign %}
{% if common_git_force_sign -%}
gpgsign = true
{% else %}
{%- else -%}
gpgsign = false
{% endif %}
{%- endif +%}
[tag]
{% if common.git.force_sign %}
{% if common_git_force_sign -%}
gpgsign = true
{% else %}
{%- else -%}
gpgsign = false
{% endif -%}
{% raw %}
{%- endif +%}
{%- raw %}
[alias]
br = "branch"
ci = "commit"

View file

@ -1,10 +1,12 @@
{% if dns[dns.type].dns4 is defined and dns[dns.type].dns4 | length > 0 -%}
{% for server in dns[dns.type].dns4 -%}
{% set dns4_servers = hostvars[inventory_hostname]["global_dns_{}_dns4".format(global_dns_type)] | default([]) %}
{% set dns6_servers = hostvars[inventory_hostname]["global_dns_{}_dns6".format(global_dns_type)] | default([]) %}
{% if dns4_servers is defined and dns4_servers | length > 0 -%}
{% for server in dns4_servers -%}
nameserver {{ server }}
{% endfor %}
{% endif %}
{% if ip_dualstack | default(false) and dns[dns.type].dns6 is defined and dns[dns.type].dns6 | length > 0 -%}
{% for server in dns[dns.type].dns6 -%}
{% if global_ip_dualstack | default(false) and dns6_servers is defined and dns6_servers | length > 0 -%}
{% for server in dns6_servers -%}
nameserver {{ server }}
{% endfor %}
{% endif %}

View file

@ -1,3 +1,3 @@
{% for item in sysctl_values.keys() -%}
{{ item }} = {{ sysctl_values[item] }}
{% for item in common_sysctl_configuration.keys() -%}
{{ item }} = {{ common_sysctl_configuration[item] }}
{% endfor %}