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

# openrc ~~ tasks/main.yml

---

- name: stat existence of distribution rc-template
  stat: path="{{ role_path }}/templates/rc_{{ os_distribution }}.yml"
  register: rc_stat

- name: include rc task per-system
  include_tasks: "rc_{{ os_distribution }}.yml"
  when: rc_stat.stat.exists

- name: start and enable service on boot
  service:
    name: "{{ rc_name }}"
    state: "{{ rc_state }}"
    enabled: "{{ rc_enable }}"
  ignore_errors: true

remember that computers suck.