diff options
-rw-r--r-- | roles/rc/tasks/main.yml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/roles/rc/tasks/main.yml b/roles/rc/tasks/main.yml index 8ba98aa..1a8a921 100644 --- a/roles/rc/tasks/main.yml +++ b/roles/rc/tasks/main.yml @@ -3,8 +3,13 @@ --- +- 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: |