fuck yaml and indentation

This commit is contained in:
Torma Kristóf 2022-04-16 19:55:29 +02:00
parent 404021807b
commit e0aeabddf3
47 changed files with 61 additions and 21 deletions

View File

@ -6,3 +6,4 @@
- common
- internalsmtp
- backupscript
...

View File

@ -7,3 +7,4 @@
- customfirewall
- backupscript
- customfirewall
...

View File

@ -6,3 +6,4 @@
- common
- docker
- internalsmtp
...

View File

@ -9,3 +9,4 @@
- internalsmtp
- backupscript
- customfirewall
...

View File

@ -1,3 +1,4 @@
---
netplan:
default_gateway: "192.168.69.254"
...

View File

@ -1,3 +1,4 @@
---
netplan:
default_gateway: "192.168.69.1"
...

View File

@ -3,3 +3,4 @@ servicename: mckay
backup:
host: oniel.tormakristof.eu
internal: false
...

View File

@ -7,3 +7,4 @@ firewall:
- port: "2222"
proto: tcp
interface: "eth0"
...

View File

@ -3,3 +3,4 @@ firewall:
- port: "3306"
proto: tcp
interface: "eth0"
...

View File

@ -22,3 +22,4 @@ netplan:
dhcp4: true
dhcp6: true
denydns: true
...

View File

@ -4,3 +4,4 @@ webserver:
port: 8080
- domain: "registry.kmlabz.com"
port: 4269
...

View File

@ -20,3 +20,4 @@ netplan:
dhcp4: true
dhcp6: false
denydns: true
...

View File

@ -3,3 +3,4 @@ firewall:
- port: "5432"
proto: tcp
interface: "eth0"
...

View File

@ -42,3 +42,4 @@ all:
ansible_host: mariadb.stargate.internal
backup:
ansible_host: backup.stargate.internal
...

View File

@ -7,3 +7,4 @@
- neko
- customfirewall
- internalsmtp
...

View File

@ -1,4 +1,5 @@
---
collections:
- ansible.posix
- community.general
- community.general
...

View File

@ -4,3 +4,4 @@ backup:
internal: true
prearecommand: ""
basedir: /mnt/backupstore
...

View File

@ -57,3 +57,4 @@
mode: 0600
owner: root
group: root
...

View File

@ -5,3 +5,4 @@ timedatectl_timeservers: ['noc-a.sch.bme.hu', 'noc-b.sch.bme.hu']
timedatectl_timeservers_fallback: ['time.bme.hu']
timedatectl_timezone: 'Europe/Budapest'
...

View File

@ -1,3 +1,4 @@
---
- name: run Timedatectl
command: timedatectl set-ntp true
...

View File

@ -35,3 +35,4 @@
- tcpdump
- xxd
- git
...

View File

@ -5,4 +5,5 @@
owner: tormakris
group: tormakris
mode: "0644"
path: /home/tormakris/.hushlogin
path: /home/tormakris/.hushlogin
...

View File

@ -10,4 +10,4 @@
content: "network: {config: disabled}"
dest: /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
force: no
...

View File

@ -6,4 +6,5 @@
- include_tasks: ufw.yaml
- include_tasks: user-ops.yaml
- include_tasks: ssh-security-settings.yaml
- include_tasks: timesync.yaml
- include_tasks: timesync.yaml
...

View File

@ -15,4 +15,5 @@
- /var/snap
- /var/lib/snapd
- "/home/{{ ansible_user }}/snap"
when: ansible_distribution == "Ubuntu"
when: ansible_distribution == "Ubuntu"
...

View File

@ -38,3 +38,4 @@
path: /etc/ssh/sshd_config
line: "AllowUsers tormakris ansible service-user"
when: checkallowusers.found == 0
...

View File

@ -16,3 +16,4 @@
state: restarted
daemon_reload: yes
name: systemd-timesyncd
...

View File

@ -18,3 +18,4 @@
community.general.ufw:
rule: allow
port: ssh
...

View File

@ -10,3 +10,4 @@
user: tormakris
state: present
key: https://static.tormakristof.eu/ssh.keys
...

View File

@ -7,3 +7,4 @@
proto: "{{item.proto}}"
interface: "{{item.interface}}"
with_items: "{{ firewall }}"
...

View File

@ -26,3 +26,4 @@
comment: Service user
groups: docker
append: yes
...

View File

@ -2,3 +2,4 @@
postfix_relayhost: 'smtp.stargate.internal'
external_domain: 'tormakris.dev'
...

View File

@ -16,3 +16,4 @@
name: postfix
state: restarted
enabled: yes
...

View File

@ -26,3 +26,4 @@
- name: Enable ufw
community.general.ufw:
state: enabled
...

View File

@ -1,3 +1,4 @@
---
netplan:
additionalinterfaces: []
...

View File

@ -2,4 +2,5 @@
- name: "netplanapply"
command: netplan apply
async: 45
poll: 0
poll: 0
...

View File

@ -14,3 +14,4 @@
src: templates/netplan.yaml
dest: /etc/netplan/00-static.yaml
notify: netplanapply
...

View File

@ -8,33 +8,34 @@ network:
dhcp-identifier: mac
dhcp4-overrides:
use-routes: false
{%- if netplan.default_gateway is defined and netplan.default_gateway|length > 0 %}
{% if netplan.default_gateway is defined and netplan.default_gateway|length > 0 %}
gateway4: {{netplan.default_gateway}}
{% endif %}
{%- if netplan.additionalinterfaces is defined and netplan.additionalinterfaces|length > 0 %}
{%- for interface in netplan.additionalinterfaces %}
{% if netplan.additionalinterfaces is defined and netplan.additionalinterfaces|length > 0 %}
{% for interface in netplan.additionalinterfaces %}
{{ interface.name }}:
dhcp4: {{ interface.dhcp4 }}
dhcp6: {{ interface.dhcp6 }}
dhcp-identifier: mac
dhcp4-overrides:
use-routes: false
{%- if interface.addresses is defined and interface.addresses|length > 0 %}
{% if interface.addresses is defined and interface.addresses|length > 0 %}
addresses:
{%- for address in interface.addresses %}
{% for address in interface.addresses %}
- {{address}}
{% endfor %}
{% endif %}
{%- if interface.gateway4 is defined and interface.gateway4|length > 0 %}
{% if interface.gateway4 is defined and interface.gateway4|length > 0 %}
gateway4: {{interface.gateway4}}
{% endif %}
{%- if interface.gateway6 is defined and interface.gateway6|length > 0 %}
{% if interface.gateway6 is defined and interface.gateway6|length > 0 %}
gateway4: {{interface.gateway6}}
{% endif %}
{%- if interface.denydns %}
{% if interface.denydns %}
nameservers:
addresses: []
search: []
{% endif %}
{% endfor %}
{% endif %}
...

View File

@ -24,9 +24,4 @@
name: openvpn
state: restarted
enabled: yes
- name: Allow openvpn port via ufw
community.general.ufw:
rule: allow
port: "1194"
proto: udp
...

View File

@ -1,3 +1,4 @@
---
postfix_relayhost: 'smtp-relay.gmail.com'
external_domain: 'tormakris.dev'
external_domain: 'tormakris.dev'
...

View File

@ -24,3 +24,4 @@
community.general.ufw:
rule: allow
port: smtp
...

View File

@ -124,3 +124,4 @@
path: "{{ item.directory }}/.git"
state: absent
with_items: "{{ static }}"
...

View File

@ -14,3 +14,4 @@ static:
- {domain: tormakris.dev, directory: /var/www/tormakristof.eu, repo: "https://git.kmlabz.com/kmlabz/homepage.git"}
- {domain: torma.xyz, directory: /var/www/tormakristof.eu, repo: "https://git.kmlabz.com/kmlabz/homepage.git"}
- {domain: kmlabz.com, directory: /var/www/kmlabz.com, repo: "https://git.kmlabz.com/kmlabz/homepage.git"}
...

View File

@ -1,3 +1,4 @@
webserver:
- domain: "_"
port: 8080
...

View File

@ -29,3 +29,4 @@
community.general.ufw:
rule: allow
port: https
...

View File

@ -5,3 +5,4 @@
- netplan
- common
- smtpgateway
...

View File

@ -5,3 +5,4 @@
- common
- webgateway
- internalsmtp
...