- name: Include OS-specific variables include_vars: "{{ lookup('first_found', params) }}" vars: params: files: "{{ distro_lookup_path }}" paths: - 'vars' - name: Include OS-specific tasks include_tasks: "{{ item }}" vars: params: files: "{{ distro_lookup_path }}" skip: true loop: "{{ query('first_found', params) }}" - name: Write Exim defaults file template: src: "{{ sysdefault_template }}" dest: "{{ sysdefault_file }}" mode: 0444 - name: Write /etc/aliases template: src: "aliases.j2" dest: "/etc/aliases" mode: 0444 - name: Write Exim config file template: src: "exim4.conf.j2" dest: "{{ config_file }}" mode: 0444 notify: - Restart exim - name: Enable exim service: name: "{{ exim_service_name }}" enabled: true