- name: check required variables fail: when: > rc_name is none or rc_user is none - name: include rc task per-system include_vars: "os_{{ ansible_distribution | lower }}.yml" - name: generate rc script for desired service template: src: "os_{{ ansible_distribution | lower }}.j2" dest: "{{ rc_dir }}/{{ rc_name }}" owner: 0 group: 0 mode: 0755