Compare commits

...

4 Commits

12 changed files with 42 additions and 16 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
playbook.retry

View File

@ -3,5 +3,14 @@ servers:
issei:
ansible_host: issei.home.sbruder.de
ansible_user: root
vars:
debian_release: buster
debian_release: buster
initramfs:
network:
address: 192.168.100.90
gateway: 192.168.100.1
netmask: 255.255.255.0
interface: enp0s25
vpn:
v4:
address: 10.80.0.1

View File

@ -5,6 +5,7 @@
- role: base
- role: dnsmasq
- role: docker
- role: grub
- role: initramfs
- role: postfix
- role: python

View File

@ -4,3 +4,7 @@
name: systemd-journald
state: restarted
- name: restart-node-exporter
systemd:
name: prometheus-node-exporter
state: restarted

View File

@ -3,3 +3,10 @@
apt:
name: prometheus-node-exporter
state: present
- name: set node exporter config
lineinfile:
path: /etc/default/prometheus-node-exporter
regexp: '^ARGS='
line: ARGS="--web.listen-address={{ vpn.v4.address }}:9100"
notify: restart-node-exporter

View File

@ -1,7 +1,7 @@
{
"log-driver": "journald",
"dns": [
"212.82.226.212",
"46.182.19.48",
"74.82.42.42"
]
}

View File

@ -1,7 +1,4 @@
---
- name: update-grub
shell: update-grub
- name: restart-docker
systemd:
name: docker

View File

@ -1,7 +0,0 @@
---
- name: add boot parameters for docker
lineinfile:
path: /etc/default/grub
regexp: ^GRUB_CMDLINE_LINUX_DEFAULT=
line: 'GRUB_CMDLINE_LINUX_DEFAULT="quiet cgroup_enable=memory swapaccount=1"'
notify: update-grub

View File

@ -3,9 +3,6 @@
- import_tasks: packages.yml
tags:
- docker:packages
- import_tasks: kernel.yml
tags:
- docker:kernel
- import_tasks: config.yml
tags:
- docker:config

View File

@ -0,0 +1,3 @@
---
- name: update-grub
shell: update-grub

View File

@ -0,0 +1,7 @@
---
- name: add boot parameters for docker
lineinfile:
path: /etc/default/grub
regexp: ^GRUB_CMDLINE_LINUX_DEFAULT=
line: 'GRUB_CMDLINE_LINUX_DEFAULT="quiet cgroup_enable=memory swapaccount=1{% if initramfs.network %} ip={{ initramfs.network.address }}::{{ initramfs.network.gateway }}:{{ initramfs.network.netmask }}:{{ inventory_hostname }}:{{ initramfs.network.interface }}:off{% endif %}"'
notify: update-grub

View File

@ -0,0 +1,7 @@
---
- block:
- import_tasks: cmdline.yml
tags:
- grub:cmdline
tags:
- grub