From 1c900a1c3dda3313df9d7889c51c82cd388ef91f Mon Sep 17 00:00:00 2001 From: jaydee Date: Mon, 18 Sep 2023 16:16:59 +0200 Subject: [PATCH] upt playbook --- playbooks/sync_ha.yaml | 2 +- playbooks/wol_enable.yml | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 playbooks/wol_enable.yml diff --git a/playbooks/sync_ha.yaml b/playbooks/sync_ha.yaml index 76eb88d..2b77020 100644 --- a/playbooks/sync_ha.yaml +++ b/playbooks/sync_ha.yaml @@ -42,7 +42,7 @@ - name: Start HA main uri: - url: "http://192.168.77.106:9000/api/stacks/2/stop?endpointId=2" + url: "http://192.168.77.106:9000/api/stacks/2/start?endpointId=2" method: POST body_format: form-urlencoded return_content: yes diff --git a/playbooks/wol_enable.yml b/playbooks/wol_enable.yml new file mode 100644 index 0000000..d3ff247 --- /dev/null +++ b/playbooks/wol_enable.yml @@ -0,0 +1,19 @@ +- hosts: containers + name: Enable WOL + gather_facts: false + tasks: + - name: Creating config + ansible.builtin.copy: + dest: "/etc/systemd/system/wol.service" + content: | + [Unit] + Description=Enable Wake On Lan + + [Service] + Type=oneshot + ExecStart = /usr/sbin/ethtool --change enp3s0 wol g + + [Install] + WantedBy=basic.target + owner: root + mode: '0744' \ No newline at end of file