Removing the last remnants of nomad and getting k3s setup
This commit is contained in:
parent
826d334c3c
commit
5b4a440cb4
@ -6,9 +6,9 @@
|
|||||||
- name: Apply the base role to the nuc
|
- name: Apply the base role to the nuc
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: base
|
name: base
|
||||||
- name: Ensure nomad fixes are applied to the nuc
|
- name: Apply the k3s base role
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nomad
|
name: k3s
|
||||||
- name: Apply the proxy role
|
- name: Apply the proxy role
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: proxy
|
name: proxy
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
become: true
|
become: true
|
||||||
tags:
|
tags:
|
||||||
- setup
|
- setup
|
||||||
- name: Run through nomad installation steps
|
- name: Run through nomad removal steps
|
||||||
tags: nomad
|
tags: nomad
|
||||||
ansible.builtin.include_tasks:
|
ansible.builtin.include_tasks:
|
||||||
file: nomad.yaml
|
file: nomad.yaml
|
||||||
|
@ -33,23 +33,22 @@
|
|||||||
- name: Install consul
|
- name: Install consul
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: consul
|
name: consul
|
||||||
|
state: absent
|
||||||
- name: Install nomad package
|
- name: Install nomad package
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
pkg: nomad
|
pkg: nomad
|
||||||
- name: Copy in the consul configuration
|
state: absent
|
||||||
vars:
|
- name: Remove the bare metal consul template
|
||||||
ip: "{{ ansible_default_ipv4['address'] }}"
|
ansible.builtin.file:
|
||||||
ansible.builtin.template:
|
path: /etc/consul.d/consul.hcl
|
||||||
src: consul.hcl
|
state: absent
|
||||||
dest: /etc/consul.d/consul.hcl
|
|
||||||
mode: "0644"
|
|
||||||
- name: Start nomad
|
- name: Start nomad
|
||||||
ansible.builtin.systemd_service:
|
ansible.builtin.systemd_service:
|
||||||
name: nomad
|
name: nomad
|
||||||
state: started
|
state: stopped
|
||||||
enabled: true
|
enabled: false
|
||||||
- name: Make sure the consul service is NOT available
|
- name: Make sure the consul service is NOT available
|
||||||
ansible.builtin.systemd_service:
|
ansible.builtin.systemd_service:
|
||||||
name: consul
|
name: consul
|
||||||
state: stopped
|
state: stopped
|
||||||
enabled: true
|
enabled: false
|
||||||
|
11
ansible/roles/k3s/tasks/main.yaml
Normal file
11
ansible/roles/k3s/tasks/main.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
- name: Download the installation script
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: https://get.k3s.io
|
||||||
|
dest: /tmp
|
||||||
|
register: install_script
|
||||||
|
- name: Run installation script
|
||||||
|
become: true
|
||||||
|
environment:
|
||||||
|
INSTALL_K3S_EXEC: server
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: sh {{ install_script.dest }}
|
0
ansible/roles/k3s/vars/main.yaml
Normal file
0
ansible/roles/k3s/vars/main.yaml
Normal file
Loading…
Reference in New Issue
Block a user