Skip to content

Commit

Permalink
fix(ansible): Fixed role changes that were lost in a git fail
Browse files Browse the repository at this point in the history
  • Loading branch information
timothystewart6 committed Mar 27, 2022
1 parent 16ee29a commit de9c932
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions roles/k3s/master/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,21 @@

- name: Wait for node-token
wait_for:
path: "{{ k3s_server_location }}/server/node-token"
path: /var/lib/rancher/k3s/server/node-token

- name: Register node-token file access mode
stat:
path: "{{ k3s_server_location }}/server/node-token"
path: /var/lib/rancher/k3s/server
register: p

- name: Change file access node-token
file:
path: "{{ k3s_server_location }}/server/node-token"
path: /var/lib/rancher/k3s/server
mode: "g+rx,o+rx"

- name: Read node-token from master
slurp:
path: "{{ k3s_server_location }}/server/node-token"
src: /var/lib/rancher/k3s/server/node-token
register: node_token

- name: Store Master node-token
Expand All @@ -134,7 +134,7 @@

- name: Restore node-token file access
file:
path: "{{ k3s_server_location }}/server/node-token"
path: /var/lib/rancher/k3s/server
mode: "{{ p.stat.mode }}"

- name: Create directory .kube
Expand Down
2 changes: 1 addition & 1 deletion roles/k3s/master/templates/k3s.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ After=network-online.target
Type=notify
ExecStartPre=-/sbin/modprobe br_netfilter
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/local/bin/k3s server --data-dir {{ k3s_server_location }} {{ extra_server_args | default("") }}
ExecStart=/usr/local/bin/k3s server {{ extra_server_args | default("") }}
KillMode=process
Delegate=yes
# Having non-zero Limit*s causes performance problems due to accounting overhead
Expand Down
1 change: 0 additions & 1 deletion roles/prereq/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
value: "1"
state: present
reload: yes
when: ansible_all_ipv6_addresses

- name: Add br_netfilter to /etc/modules-load.d/
copy:
Expand Down

0 comments on commit de9c932

Please sign in to comment.