Concluding the testing of the Geth role

This commit is contained in:
2026-08-10 16:33:41 -05:00
parent a7c8d6471b
commit ac7abefb77
5 changed files with 42 additions and 37 deletions
+25 -23
View File
@@ -100,40 +100,42 @@ all:
ups: 'apc'
active_vms:
- Yggdrasil
Geth:
vars:
geth_primary: Geth1
pitest:
hosts:
Geth0:
ipinterface: eth0
ip: 10.0.1.9
mac: b8:27:eb:09:a1:a0
static: true
Geth5:
ipinterface: eth0
ip: 10.0.1.14
mac: b8:27:eb:81:f5:4b
static: true
Geth:
vars:
geth_primary: Geth1
hosts:
Geth1:
ipinterface: eth0
ip: 10.0.1.10
mac: e4:5f:01:01:ff:d5
static: true
# Geth2:
# ipinterface: eth0
# ip: 10.0.1.11
# mac: e4:5f:01:01:ff:9c
# static: true
# Geth3:
# ipinterface: eth0
# ip: 10.0.1.12
# mac: e4:5f:01:01:ff:96
# static: true
# Geth4:
# ipinterface: eth0
# ip: 10.0.1.13
# mac: e4:5f:01:01:ff:e4
# static: true
# Geth5:
# ipinterface: eth0
# ip: 10.0.1.14
# mac: b8:27:eb:81:f5:4b
# static: true
Geth2:
ipinterface: eth0
ip: 10.0.1.11
mac: e4:5f:01:01:ff:9c
static: true
Geth3:
ipinterface: eth0
ip: 10.0.1.12
mac: e4:5f:01:01:ff:96
static: true
Geth4:
ipinterface: eth0
ip: 10.0.1.13
mac: e4:5f:01:01:ff:e4
static: true
virtual: # 10.0.1.16/28
vars:
hosts:
-3
View File
@@ -14,6 +14,3 @@
- name: Worker tasks
include_tasks: worker.yml
when: "not inventory_hostname == geth_primary"
- name: Service tasks
include_tasks: services.yml
+7
View File
@@ -15,3 +15,10 @@
- name: Ensure the token is in vault
assert:
that: k3s_token_cat.stdout_lines[0] is in secrets['Geth']['k3s_token']
- name: Enable k3s
become: yes
ansible.builtin.service:
name: k3s
state: restarted
enabled: yes
-8
View File
@@ -1,8 +0,0 @@
---
- name: Enable k3s
become: yes
ansible.builtin.service:
name: k3s
state: restarted
enabled: yes
+10 -3
View File
@@ -1,7 +1,14 @@
---
- name: Set up primary
- name: Set up worker
become: yes
ansible.builtin.command:
cmd: '/bin/bash -c "K3S_TOKEN={{ secrets['Geth']['k3s_token'] }} K3S_URL=https://{{ geth_primary }}:6443 K3S_NODE_NAME=${HOSTNAME} /usr/local/sbin/get-k3s.sh"'
creates: /etc/systemd/system/k3s.service
cmd: /bin/bash -c "K3S_TOKEN={{ secrets['Geth']['k3s_token'] }} K3S_URL=https://{{ geth_primary }}:6443 K3S_NODE_NAME=${HOSTNAME} /usr/local/sbin/get-k3s.sh"
creates: /etc/systemd/system/k3s-agent.service
- name: Enable k3s-agent
become: yes
ansible.builtin.service:
name: k3s-agent
state: restarted
enabled: yes