aboutsummaryrefslogtreecommitdiffstats
path: root/roles/rc/tasks/main.yml
blob: 3e0f0b5dba747ec8579d9d6858e56d122b3ce641 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---

- name: check required variables
  ansible.builtin.fail:
  when: >
    rc_name is none or
    rc_user is none

- name: include rc task per-system
  ansible.builtin.include_vars: "os_{{ ansible_distribution | lower }}.yml"

- name: generate rc script for desired service
  ansible.builtin.template:
    src: "os_{{ ansible_distribution | lower }}.j2"
    dest: "{{ rc_dir }}/{{ rc_name }}"
    owner: 0
    group: 0
    mode: 0755
remember that computers suck.