diff --git a/playbooks/wol_enable.yml b/playbooks/wol_enable.yml index dca4586..b398f4b 100644 --- a/playbooks/wol_enable.yml +++ b/playbooks/wol_enable.yml @@ -13,25 +13,25 @@ set_fact: wifi_adapter: '{{ item }}' loop: '{{ ansible_facts.interfaces }}' - when: 'item.startswith("eno")' - - - name: Creating config + when: 'item.startswith("enp")' + + - name: Creating a file with content become: true - ansible.builtin.copy: - - dest: "/etc/systemd/system/wol.service" + copy: + dest: "//etc/systemd/system/wol.service" content: | - [Unit] - Description=Enable Wake On Lan + [Unit] + Description=Enable Wake On Lan - [Service] - Type=oneshot - ExecStart = /usr/sbin/ethtool --change {{ wifi_adapter }} wol g + [Service] + Type=oneshot + ExecStart = /usr/sbin/ethtool --change {{ wifi_adapter }} wol g - [Install] - WantedBy=basic.target + [Install] + WantedBy=basic.target owner: root mode: '0744' + - name: Restart service wol, in all cases ansible.builtin.service: name: wol diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 62c61f3..b9016c4 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -2,3 +2,7 @@ ansible.builtin.apt: upgrade: full become: true +- name: Upgrade flatpack + ansible.builtin.command: flatpak update -y + become: true + when: inventory_hostname == 'morefine.home.lan' \ No newline at end of file