# 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