configurations-ansible/roles/wakeonlan/tasks/install_systemd_service.yml

20 lines
540 B
YAML
Raw Permalink Normal View History

2023-01-05 16:01:31 +01:00
- name: Setup systemd
when: 'is_docker is not true'
block:
- name: Install systemd files
ansible.builtin.template:
src: '{{ item.src }}'
dest: '/{{ item.path }}'
with_community.general.filetree: '../templates/systemd/'
vars:
interface: "{{ wakeonlan_interface }}"
mode: "{{ wakeonlan_mode }}"
when: item.state == 'file'
- name: Enable service
ansible.builtin.systemd:
name: wol-enable
state: started
enabled: true
daemon_reload: yes