From aea6b114e050545ccc8b953c579d53c9158e238b Mon Sep 17 00:00:00 2001 From: binary Date: Sun, 15 Nov 2020 17:26:32 +0100 Subject: I'm so lazy so ignore this cimment this time pls --- roles/rc/tasks/main.yml | 7 +++++++ roles/rc/tasks/rc_alpine.yml | 21 +++++++++++++++++++++ roles/rc/tasks/rc_openbsd.yml | 21 +++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 roles/rc/tasks/main.yml create mode 100644 roles/rc/tasks/rc_alpine.yml create mode 100644 roles/rc/tasks/rc_openbsd.yml (limited to 'roles/rc/tasks') diff --git a/roles/rc/tasks/main.yml b/roles/rc/tasks/main.yml new file mode 100644 index 0000000..ef8d4f3 --- /dev/null +++ b/roles/rc/tasks/main.yml @@ -0,0 +1,7 @@ + +# openrc ~~ tasks/main.yml + +--- + +- include_tasks: "rc_{{ ansible_distribution | lower }}.yml" + diff --git a/roles/rc/tasks/rc_alpine.yml b/roles/rc/tasks/rc_alpine.yml new file mode 100644 index 0000000..7d35528 --- /dev/null +++ b/roles/rc/tasks/rc_alpine.yml @@ -0,0 +1,21 @@ + +# openrc ~~ tasks/main.yml + +--- + +- name: Generate rc script for desired service + template: + src: rc_alpine.j2 + dest: "{{ rc_alpine_dir }}/{{ rc_name }}" + +- file: + path: "{{ rc_alpine_dir }}/{{ rc_name }}" + owner: "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 new file mode 100644 index 0000000..3d89e55 --- /dev/null +++ b/roles/rc/tasks/rc_openbsd.yml @@ -0,0 +1,21 @@ + +# openrc ~~ tasks/main.yml + +--- + +- name: Generate rc script for desired service + template: + src: rc_openbsd.j2 + dest: "{{ rc_openbsd_dir }}/{{ rc_name }}" + +- file: + path: "{{ rc_openbsd_dir }}/{{ rc_name }}" + owner: "root" + group: "{{ group_root }}" + mode: "0555" + +- service: + name: "{{ rc_name }}" + state: started + enabled: true + -- cgit v1.2.3