aboutsummaryrefslogblamecommitdiffstats
path: root/roles/rc/tasks/main.yml
blob: 1a8a921ea328ff8ef7fb944d30bc89351bb0f13b (plain) (tree)
1
2
3
4
5
6
7
8
9




                          



                                                                     

                                               
                           





                                        
                     
 

# 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.