Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug and use global vars #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ansible/roles/k3s-agent/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions ansible/roles/k3s-server/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions ansible/site.yml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -11,7 +11,7 @@

- name: Provision k3s server node
hosts: k3s-server
remote_user: pi
remote_user: "{{ ssh_user }}"
become: yes
become_user: root

Expand All @@ -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

Expand All @@ -29,7 +29,7 @@

- name: Provision k3s agent nodes
hosts: k3s-agents
remote_user: pi
remote_user: "{{ ssh_user }}"
become: yes
become_user: root

Expand Down