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 for recreating new control planes (2nd run) #393

Merged
merged 2 commits into from
Jan 19, 2024
Merged
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
9 changes: 8 additions & 1 deletion roles/k3s_server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
state: stopped
failed_when: false

# k3s-init won't work if the port is already in use
- name: Stop k3s
systemd:
name: k3s
state: stopped
failed_when: false

- name: Clean previous runs of k3s-init # noqa command-instead-of-module
# The systemd module does not support "reset-failed", so we need to resort to command.
command: systemctl reset-failed k3s-init
Expand All @@ -29,7 +36,7 @@
-p Restart=on-failure \
--unit=k3s-init \
k3s server {{ server_init_args }}"
creates: "{{ systemd_dir }}/k3s.service"
creates: "{{ systemd_dir }}/k3s-init.service"

- name: Verification
when: not ansible_check_mode
Expand Down
Loading