summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-07-21 13:23:15 +0200
committerAhmed Abdelhalim <[email protected]>2026-07-21 13:23:15 +0200
commit5a677725003444d5fc02e4f754392bafaecbde2f (patch)
treee373647c7b70dedf4130ef7c1e5b1de04e02b601 /roles
parent0be7583911bfe15276b736697caebb3752da56b6 (diff)
Add missing crond dependency for alpine
Diffstat (limited to 'roles')
-rw-r--r--roles/backup/meta/main.yml4
-rw-r--r--roles/busybox-openrc/meta/argument_specs.yml4
-rw-r--r--roles/busybox-openrc/meta/main.yml11
-rw-r--r--roles/busybox-openrc/tasks/main.yml6
4 files changed, 25 insertions, 0 deletions
diff --git a/roles/backup/meta/main.yml b/roles/backup/meta/main.yml
index 26db6058..30ba5818 100644
--- a/roles/backup/meta/main.yml
+++ b/roles/backup/meta/main.yml
@@ -2,6 +2,10 @@
dependencies:
- role: "bash"
- role: "restic"
+ - role: "systemd"
+ when: ansible_facts['service_mgr'] == "systemd"
+ - role: "busybox-openrc"
+ when: ansible_facts['service_mgr'] == "openrc"
galaxy_info:
author: "a14m"
description: "Backup a directory to S3 using restic"
diff --git a/roles/busybox-openrc/meta/argument_specs.yml b/roles/busybox-openrc/meta/argument_specs.yml
new file mode 100644
index 00000000..5af49897
--- /dev/null
+++ b/roles/busybox-openrc/meta/argument_specs.yml
@@ -0,0 +1,4 @@
+---
+argument_specs:
+ main:
+ options: {}
diff --git a/roles/busybox-openrc/meta/main.yml b/roles/busybox-openrc/meta/main.yml
new file mode 100644
index 00000000..bf91999c
--- /dev/null
+++ b/roles/busybox-openrc/meta/main.yml
@@ -0,0 +1,11 @@
+---
+dependencies: []
+galaxy_info:
+ author: "a14m"
+ description: "Install busybox-openrc for busybox applet init scripts (e.g. crond)"
+ license: "MIT"
+ min_ansible_version: "2.18"
+ platforms:
+ - name: "Alpine"
+ versions:
+ - "all"
diff --git a/roles/busybox-openrc/tasks/main.yml b/roles/busybox-openrc/tasks/main.yml
new file mode 100644
index 00000000..75b8e5b6
--- /dev/null
+++ b/roles/busybox-openrc/tasks/main.yml
@@ -0,0 +1,6 @@
+---
+- name: "Ensure busybox-openrc is installed"
+ become: true
+ ansible.builtin.package:
+ name: "busybox-openrc"
+ state: "present"