feat(ci): comply with linter

This commit is contained in:
Simon Cornet 2025-03-31 18:24:43 +02:00
commit 80292a63a9
12 changed files with 23 additions and 45 deletions

View file

@ -2,6 +2,7 @@
# apt cleanup
- name: "apt cleanup"
tags: "apt-cleanup"
block:
# clean apt cache
@ -18,5 +19,3 @@
changed_when: false
failed_when: false
when: 'type == "vm"'
tags: "apt-cleanup"

View file

@ -2,6 +2,7 @@
# apt config
- name: "apt config"
tags: ["apt"]
block:
# configure apt auto update
@ -22,6 +23,3 @@
group: "root"
mode: "0644"
when: 'ansible_os_family == "Debian"'
tags:
- "apt"

View file

@ -2,6 +2,7 @@
# apt packages
- name: "apt packages"
tags: ["apt"]
block:
# install packages
@ -25,6 +26,3 @@
loop: "{{ apt_default_packages_delete }}"
loop_control:
loop_var: "apt_default_delete"
tags:
- "apt"

View file

@ -2,6 +2,7 @@
# manage apt sources
- name: "manage apt sources"
tags: ["apt"]
block:
# configure apt sources
@ -38,6 +39,3 @@
when:
- 'ansible_distribution == "Ubuntu"'
- 'ansible_distribution_major_version >= "24"'
tags:
- "apt"

View file

@ -2,6 +2,7 @@
# basic firewall rules
- name: "basic firewall rules"
tags: ["firewall"]
block:
# basic firewall rules
@ -24,6 +25,3 @@
with_nested:
- "{{ __rule['source_nets'] }}"
- "{{ __rule['destination_nets'] }}"
tags:
- "firewall"

View file

@ -2,17 +2,6 @@
# import ossupport and load variables
- name: "import ossupport and load variables"
block:
# check os support
- name: "check for os support"
ansible.builtin.import_tasks: "ossupport.yaml"
# load os variables
- name: "include os specific vars"
ansible.builtin.include_vars: "{{ ansible_os_family }}.yaml"
when: "os_support"
tags:
- "apt"
- "apt-cleanup"
@ -34,6 +23,17 @@
- "syslog"
- "timezone"
- "usermanagement"
block:
# check os support
- name: "check for os support"
ansible.builtin.import_tasks: "ossupport.yaml"
# load os variables
- name: "include os specific vars"
ansible.builtin.include_vars: "{{ ansible_os_family }}.yaml"
when: "os_support"
# set hostname
- name: "set hostname"

View file

@ -1,6 +1,7 @@
---
- name: "manage motd"
tags: ["motd"]
block:
# find old motd files
@ -36,6 +37,3 @@
group: "root"
mode: "0755"
when: 'ansible_os_family == "Debian"'
tags:
- "motd"

View file

@ -1,6 +1,7 @@
---
- name: "manage ntp"
tags: ["ntp"]
block:
# install chrony
@ -20,6 +21,3 @@
mode: "0644"
when: 'ansible_os_family == "Debian"'
notify: "restart chrony"
tags:
- "ntp"

View file

@ -2,8 +2,8 @@
# manage snapd
- name: "manage snapd"
block:
tags: ["snap"]
block:
# set defaults
- name: "set facts"
ansible.builtin.set_fact:
@ -32,6 +32,3 @@
state: "started"
enabled: true
when: "__snapd_service"
tags:
- "snap"

View file

@ -2,6 +2,7 @@
# manage swap
- name: "manage swap"
tags: ["swap"]
block:
# enable or disable swap
@ -76,6 +77,3 @@
dump: "0"
state: "absent"
when: "not __swap"
tags:
- "swap"

View file

@ -2,6 +2,7 @@
# manage syslog
- name: "manage syslog"
tags: ["syslog"]
block:
# configure rsyslogd - debian
@ -47,6 +48,3 @@
mode: "0644"
when: 'ansible_os_family == "Debian"'
notify: "restart rsyslog"
tags:
- "syslog"

View file

@ -2,6 +2,7 @@
# manage users
- name: "manage users"
tags: ["usermanagement"]
block:
# manage facts
@ -69,6 +70,3 @@
path: "/etc/sudoers.d/{{ __user['username'] }}"
when:
- "not sudo_file"
tags:
- "usermanagement"