Compare commits

...

4 Commits

Author SHA1 Message Date
333e1cbeb9 roles/mariadb/handlers/main.yml: update syntax 2025-09-21 17:32:57 +03:00
0c62f4bdf0 roles/common/tasks/packages.yml: improve task key order
Suggested by ansible-lint. Makes it easier to see the tags after the
very long block.
2025-09-21 17:30:54 +03:00
26f22c0447 roles/munin: update task syntax 2025-09-21 17:29:22 +03:00
05881e2585 roles: fix unquoted octal modes 2025-09-21 17:25:22 +03:00
7 changed files with 32 additions and 14 deletions

View File

@@ -27,7 +27,7 @@
dest: /etc/sysctl.conf
owner: root
group: root
mode: 0644
mode: "0644"
notify:
- reload sysctl
tags: sysctl
@@ -38,7 +38,7 @@
dest: /etc/udev/rules.d/60-scheduler.rules
owner: root
group: root
mode: 0644
mode: "0644"
tags: udev
- name: Copy admin SSH keys

View File

@@ -1,5 +1,6 @@
---
- name: Configure Debian packages
tags: packages
block:
# Scaleway seems to use a weird sources.list format as of Debian 12?
- name: Check for weird Debian sources
@@ -16,7 +17,7 @@
dest: /etc/apt/sources.list
owner: root
group: root
mode: 0644
mode: "0644"
- name: Set fact for base packages
ansible.builtin.set_fact:
@@ -52,6 +53,5 @@
- name: Install tarsnap
ansible.builtin.import_tasks: tarsnap.yml
tags: packages
# vim: set sw=2 ts=2:

View File

@@ -6,7 +6,7 @@
dest: /etc/ssh/sshd_config
owner: root
group: root
mode: 0600
mode: "0600"
notify: reload sshd
# See: WeakDH (2015): https://weakdh.org/sysadmin.html

View File

@@ -1,5 +1,7 @@
---
- name: restart mariadb
ansible.builtin.systemd: name=mariadb state=restarted
ansible.builtin.systemd:
name: mariadb
state: restarted
# vim: set ts=2 sw=2:

View File

@@ -1,16 +1,22 @@
---
- name: Install munin-node
ansible.builtin.apt: name=munin-node state=present
ansible.builtin.apt:
name: munin-node
state: present
tags: packages
# some nice things to have for munin-node on Ubuntu
# libwww-perl: for munin's nginx_status check
- name: Install munin-node deps
ansible.builtin.apt: name=libwww-perl state=present
ansible.builtin.apt:
name: libwww-perl
state: present
tags: packages
- name: Create munin-node.conf
ansible.builtin.template: src=munin-node.conf.j2 dest=/etc/munin/munin-node.conf
ansible.builtin.template:
src: munin-node.conf.j2
dest: /etc/munin/munin-node.conf
notify:
- restart munin-node
@@ -20,6 +26,9 @@
- restart munin-node
- name: Start munin-node
ansible.builtin.systemd: name=munin-node state=started enabled=true
ansible.builtin.systemd:
name: munin-node
state: started
enabled: true
# vim: set ts=2 sw=2:

View File

@@ -1,9 +1,16 @@
---
- name: Install munin package
ansible.builtin.apt: name=munin state=present
ansible.builtin.apt:
name: munin
state: present
tags: packages
- name: Create munin configuration file
ansible.builtin.template: src=munin.conf.j2 dest=/etc/munin/munin.conf owner=root group=root mode=0644
ansible.builtin.template:
src: munin.conf.j2
dest: /etc/munin/munin.conf
owner: root
group: root
mode: "0644"
# vim: set ts=2 sw=2:

View File

@@ -4,7 +4,7 @@
ansible.builtin.template:
src: vhost.conf.j2
dest: "{{ nginx_confd_path }}/{{ item.domain_name }}.conf"
mode: 0644
mode: "0644"
owner: root
group: root
loop: "{{ nginx_vhosts }}"
@@ -30,7 +30,7 @@
ansible.builtin.file:
path: "{{ nginx_root_prefix }}/{{ item.domain_name }}"
state: directory
mode: 0755
mode: "0755"
owner: nginx
group: nginx
loop: "{{ nginx_vhosts }}"