Concluding the testing of the Geth role
This commit is contained in:
+25
-23
@@ -100,40 +100,42 @@ all:
|
|||||||
ups: 'apc'
|
ups: 'apc'
|
||||||
active_vms:
|
active_vms:
|
||||||
- Yggdrasil
|
- Yggdrasil
|
||||||
Geth:
|
pitest:
|
||||||
vars:
|
|
||||||
geth_primary: Geth1
|
|
||||||
hosts:
|
hosts:
|
||||||
Geth0:
|
Geth0:
|
||||||
ipinterface: eth0
|
ipinterface: eth0
|
||||||
ip: 10.0.1.9
|
ip: 10.0.1.9
|
||||||
mac: b8:27:eb:09:a1:a0
|
mac: b8:27:eb:09:a1:a0
|
||||||
static: true
|
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:
|
Geth1:
|
||||||
ipinterface: eth0
|
ipinterface: eth0
|
||||||
ip: 10.0.1.10
|
ip: 10.0.1.10
|
||||||
mac: e4:5f:01:01:ff:d5
|
mac: e4:5f:01:01:ff:d5
|
||||||
static: true
|
static: true
|
||||||
# Geth2:
|
Geth2:
|
||||||
# ipinterface: eth0
|
ipinterface: eth0
|
||||||
# ip: 10.0.1.11
|
ip: 10.0.1.11
|
||||||
# mac: e4:5f:01:01:ff:9c
|
mac: e4:5f:01:01:ff:9c
|
||||||
# static: true
|
static: true
|
||||||
# Geth3:
|
Geth3:
|
||||||
# ipinterface: eth0
|
ipinterface: eth0
|
||||||
# ip: 10.0.1.12
|
ip: 10.0.1.12
|
||||||
# mac: e4:5f:01:01:ff:96
|
mac: e4:5f:01:01:ff:96
|
||||||
# static: true
|
static: true
|
||||||
# Geth4:
|
Geth4:
|
||||||
# ipinterface: eth0
|
ipinterface: eth0
|
||||||
# ip: 10.0.1.13
|
ip: 10.0.1.13
|
||||||
# mac: e4:5f:01:01:ff:e4
|
mac: e4:5f:01:01:ff:e4
|
||||||
# static: true
|
static: true
|
||||||
# Geth5:
|
|
||||||
# ipinterface: eth0
|
|
||||||
# ip: 10.0.1.14
|
|
||||||
# mac: b8:27:eb:81:f5:4b
|
|
||||||
# static: true
|
|
||||||
virtual: # 10.0.1.16/28
|
virtual: # 10.0.1.16/28
|
||||||
vars:
|
vars:
|
||||||
hosts:
|
hosts:
|
||||||
|
|||||||
@@ -14,6 +14,3 @@
|
|||||||
- name: Worker tasks
|
- name: Worker tasks
|
||||||
include_tasks: worker.yml
|
include_tasks: worker.yml
|
||||||
when: "not inventory_hostname == geth_primary"
|
when: "not inventory_hostname == geth_primary"
|
||||||
|
|
||||||
- name: Service tasks
|
|
||||||
include_tasks: services.yml
|
|
||||||
|
|||||||
@@ -15,3 +15,10 @@
|
|||||||
- name: Ensure the token is in vault
|
- name: Ensure the token is in vault
|
||||||
assert:
|
assert:
|
||||||
that: k3s_token_cat.stdout_lines[0] is in secrets['Geth']['k3s_token']
|
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
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: Enable k3s
|
|
||||||
become: yes
|
|
||||||
ansible.builtin.service:
|
|
||||||
name: k3s
|
|
||||||
state: restarted
|
|
||||||
enabled: yes
|
|
||||||
@@ -1,7 +1,14 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Set up primary
|
- name: Set up worker
|
||||||
become: yes
|
become: yes
|
||||||
ansible.builtin.command:
|
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"'
|
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
|
creates: /etc/systemd/system/k3s-agent.service
|
||||||
|
|
||||||
|
- name: Enable k3s-agent
|
||||||
|
become: yes
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: k3s-agent
|
||||||
|
state: restarted
|
||||||
|
enabled: yes
|
||||||
|
|||||||
Reference in New Issue
Block a user