From c8c5067fbaf4be17225f3bf67ff134e5b3fe9197 Mon Sep 17 00:00:00 2001 From: Maximilian Mitchell Date: Sat, 13 Jun 2020 14:55:57 +0100 Subject: [PATCH 1/2] create missing env file --- ansible/roles/k3s-agent/tasks/main.yml | 6 ++++++ ansible/roles/k3s-server/tasks/main.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/ansible/roles/k3s-agent/tasks/main.yml b/ansible/roles/k3s-agent/tasks/main.yml index 1c4d5a3..284e6d9 100644 --- a/ansible/roles/k3s-agent/tasks/main.yml +++ b/ansible/roles/k3s-agent/tasks/main.yml @@ -1,4 +1,10 @@ --- +- name: Create empty k3s env file + copy: + content: "" + dest: /etc/systemd/system/k3s.service.env + force: no + - name: Install k3s agent service get_url: url: https://raw.githubusercontent.com/rancher/k3s/master/k3s.service diff --git a/ansible/roles/k3s-server/tasks/main.yml b/ansible/roles/k3s-server/tasks/main.yml index d0acd34..3a3f9b5 100644 --- a/ansible/roles/k3s-server/tasks/main.yml +++ b/ansible/roles/k3s-server/tasks/main.yml @@ -1,4 +1,10 @@ --- +- name: Create empty k3s env file + copy: + content: "" + dest: /etc/systemd/system/k3s.service.env + force: no + - name: Install k3s server service get_url: url: https://raw.githubusercontent.com/rancher/k3s/master/k3s.service From be3d17ff62fcc3e1dc7e24bf3746312d3e809927 Mon Sep 17 00:00:00 2001 From: Maximilian Mitchell Date: Sat, 13 Jun 2020 14:56:35 +0100 Subject: [PATCH 2/2] actually use group vars --- ansible/site.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/site.yml b/ansible/site.yml index 61e1670..84ac517 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -1,7 +1,7 @@ --- - name: Provision k3s nodes hosts: k3s-server:k3s-agents - remote_user: pi + remote_user: "{{ ssh_user }}" become: yes become_user: root @@ -11,7 +11,7 @@ - name: Provision k3s server node hosts: k3s-server - remote_user: pi + remote_user: "{{ ssh_user }}" become: yes become_user: root @@ -20,7 +20,7 @@ - name: Get k3s server config for all nodes hosts: all - remote_user: pi + remote_user: "{{ ssh_user }}" become: yes become_user: root @@ -29,7 +29,7 @@ - name: Provision k3s agent nodes hosts: k3s-agents - remote_user: pi + remote_user: "{{ ssh_user }}" become: yes become_user: root