From 8b51132274cece3b21fe92c63923ba6921182dd4 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Mon, 10 Jul 2023 22:24:16 +0200 Subject: [PATCH] ansible: Configure control ports Each instance will have its own port to loop back on kosmos.codepro.be. Assign a unique port to each, and save it in sysrc. We'll have to script something around autossh, but this is the main new ansible feature to test. --- ansible/inventory.yaml | 5 +++++ ansible/playbook-pull.yaml | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ansible/inventory.yaml b/ansible/inventory.yaml index 35098a3..76fd443 100644 --- a/ansible/inventory.yaml +++ b/ansible/inventory.yaml @@ -1,7 +1,12 @@ domoticamachines: hosts: pennestraat20: + control_port: 2400 pennestraat22: + control_port: 2401 pennestraat22a: + control_port: 2402 qemu: + control_port: 2403 poudriere-image: + control_port: 0 diff --git a/ansible/playbook-pull.yaml b/ansible/playbook-pull.yaml index f3a35b9..32606f0 100644 --- a/ansible/playbook-pull.yaml +++ b/ansible/playbook-pull.yaml @@ -8,6 +8,10 @@ - name: test playbook hosts: domoticamachines tasks: + - name: autossh config + community.general.sysrc: + name: control_port + value: "{{ control_port }}" - name: Install nginx community.general.pkgng: name: nginx -- 2.51.0