summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-12-22 00:50:42 +0100
committerChristian Pointner <equinox@spreadspace.org>2021-12-22 00:50:42 +0100
commit91f208e7d728f73c1c763157ebd0a358c5bd9fda (patch)
treefc9ad6c4a95945ab2b6288e41dc393244ea8343f
parentadd role for dhcp-server (diff)
add wakup script to jump host
-rw-r--r--chaos-at-home/ch-gw-lan.yml22
-rw-r--r--chaos-at-home/ch-jump.yml19
2 files changed, 41 insertions, 0 deletions
diff --git a/chaos-at-home/ch-gw-lan.yml b/chaos-at-home/ch-gw-lan.yml
index 1d4ad5f2..5e76e90a 100644
--- a/chaos-at-home/ch-gw-lan.yml
+++ b/chaos-at-home/ch-gw-lan.yml
@@ -8,3 +8,25 @@
- role: core/zsh
- role: core/ntp
- role: network/dhcp-server
+ post_tasks:
+ - name: install etherwake
+ apt:
+ name: etherwake
+ state: present
+
+ - name: install wakeup scripts
+ loop:
+ - name: epimetheus
+ interface: lan0
+ mac: 90:2b:34:35:da:88
+ - name: mc
+ interface: lan0
+ mac: 00:1e:8c:f4:e6:d8
+ loop_control:
+ label: "{{ item.name }}"
+ copy:
+ dest: "/usr/local/bin/wakeup-{{ item.name }}"
+ content: |
+ #!/bin/sh
+ exec etherwake -i {{ item.interface }} {{ item.mac }}
+ mode: 0755
diff --git a/chaos-at-home/ch-jump.yml b/chaos-at-home/ch-jump.yml
index fbfb6631..a8e11ce5 100644
--- a/chaos-at-home/ch-jump.yml
+++ b/chaos-at-home/ch-jump.yml
@@ -8,3 +8,22 @@
- role: core/zsh
- role: core/ntp
- role: core/sshd/jump
+ post_tasks:
+ - name: install etherwake
+ apt:
+ name: etherwake
+ state: present
+
+ - name: install wakeup scripts
+ loop:
+ - name: equinoxws
+ interface: mgmt0
+ mac: b4:2e:99:9f:bb:7c
+ loop_control:
+ label: "{{ item.name }}"
+ copy:
+ dest: "/usr/local/bin/wakeup-{{ item.name }}"
+ content: |
+ #!/bin/sh
+ exec etherwake -i {{ item.interface }} {{ item.mac }}
+ mode: 0755