aboutsummaryrefslogtreecommitdiffstats
path: root/roles/rc/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/rc/tasks')
-rw-r--r--roles/rc/tasks/main.yml9
-rw-r--r--roles/rc/tasks/rc_alpine.yml7
-rw-r--r--roles/rc/tasks/rc_openbsd.yml9
3 files changed, 11 insertions, 14 deletions
diff --git a/roles/rc/tasks/main.yml b/roles/rc/tasks/main.yml
index ef8d4f3..142b5b5 100644
--- a/roles/rc/tasks/main.yml
+++ b/roles/rc/tasks/main.yml
@@ -3,5 +3,12 @@
---
-- include_tasks: "rc_{{ ansible_distribution | lower }}.yml"
+- name: include rc task per-system
+ include_tasks: "rc_{{ os_distribution }}.yml"
+
+- name: start and enable service on boot
+ service:
+ name: "{{ rc_name }}"
+ state: "{{ rc_state }}"
+ enabled: "{{ rc_enable }}"
diff --git a/roles/rc/tasks/rc_alpine.yml b/roles/rc/tasks/rc_alpine.yml
index 7d35528..24af1fb 100644
--- a/roles/rc/tasks/rc_alpine.yml
+++ b/roles/rc/tasks/rc_alpine.yml
@@ -10,12 +10,7 @@
- file:
path: "{{ rc_alpine_dir }}/{{ rc_name }}"
- owner: "root"
+ owner: "{{ user_root }}"
group: "{{ group_root }}"
mode: "0755"
-- service:
- name: "{{ rc_name }}"
- state: started
- enabled: true
-
diff --git a/roles/rc/tasks/rc_openbsd.yml b/roles/rc/tasks/rc_openbsd.yml
index 3d89e55..2055de0 100644
--- a/roles/rc/tasks/rc_openbsd.yml
+++ b/roles/rc/tasks/rc_openbsd.yml
@@ -10,12 +10,7 @@
- file:
path: "{{ rc_openbsd_dir }}/{{ rc_name }}"
- owner: "root"
+ owner: "{{ user_root }}"
group: "{{ group_root }}"
- mode: "0555"
-
-- service:
- name: "{{ rc_name }}"
- state: started
- enabled: true
+ mode: 0555
remember that computers suck.