node installation
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
---
|
|
||||||
- name: Install k3s Node (agent)
|
- name: Install k3s Node (agent)
|
||||||
hosts: nodes
|
hosts: nodes
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
- name: Ensure Directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /etc/rancher/k3s
|
||||||
|
state: directory
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "755"
|
||||||
|
become: True
|
||||||
|
|
||||||
- name: Copy Configuration
|
- name: Copy Configuration
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: config.yaml.j2
|
src: config.yaml.j2
|
||||||
@@ -10,7 +19,7 @@
|
|||||||
become: True
|
become: True
|
||||||
|
|
||||||
- name: Run Installation
|
- name: Run Installation
|
||||||
ansible.builtin.command:
|
ansible.builtin.shell:
|
||||||
cmd: curl -sfL https://get.k3s.io | sh -s - agent
|
cmd: curl -sfL https://get.k3s.io | sh -s - agent
|
||||||
creates: /etc/systemd/system/k3s-agent.service
|
creates: /etc/systemd/system/k3s-agent.service
|
||||||
become: True
|
become: True
|
||||||
|
|||||||
Reference in New Issue
Block a user