mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2025-12-25 18:23:05 +01:00
Compare commits
5 Commits
4603a2e461
...
54517f958e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54517f958e | ||
|
|
edf0c9eebd | ||
|
|
5de918f9ad | ||
|
|
586434b80d | ||
|
|
1e25cce032 |
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
@@ -2,6 +2,7 @@
|
|||||||
name: Test
|
name: Test
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
molecule:
|
molecule:
|
||||||
name: Molecule
|
name: Molecule
|
||||||
|
|||||||
@@ -6,6 +6,13 @@
|
|||||||
state: stopped
|
state: stopped
|
||||||
failed_when: false
|
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
|
- 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.
|
# The systemd module does not support "reset-failed", so we need to resort to command.
|
||||||
command: systemctl reset-failed k3s-init
|
command: systemctl reset-failed k3s-init
|
||||||
@@ -29,7 +36,7 @@
|
|||||||
-p Restart=on-failure \
|
-p Restart=on-failure \
|
||||||
--unit=k3s-init \
|
--unit=k3s-init \
|
||||||
k3s server {{ server_init_args }}"
|
k3s server {{ server_init_args }}"
|
||||||
creates: "{{ systemd_dir }}/k3s.service"
|
creates: "{{ systemd_dir }}/k3s-init.service"
|
||||||
|
|
||||||
- name: Verification
|
- name: Verification
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|||||||
@@ -33,6 +33,14 @@
|
|||||||
- raspberry_pi|default(false)
|
- raspberry_pi|default(false)
|
||||||
- ansible_facts.lsb.description|default("") is match("Debian.*buster")
|
- ansible_facts.lsb.description|default("") is match("Debian.*buster")
|
||||||
|
|
||||||
|
- name: Set detected_distribution to Raspbian (ARM64 on Debian Bookworm)
|
||||||
|
set_fact:
|
||||||
|
detected_distribution: Raspbian
|
||||||
|
when:
|
||||||
|
- ansible_facts.architecture is search("aarch64")
|
||||||
|
- raspberry_pi|default(false)
|
||||||
|
- ansible_facts.lsb.description|default("") is match("Debian.*bookworm")
|
||||||
|
|
||||||
- name: Set detected_distribution_major_version
|
- name: Set detected_distribution_major_version
|
||||||
set_fact:
|
set_fact:
|
||||||
detected_distribution_major_version: "{{ ansible_facts.lsb.major_release }}"
|
detected_distribution_major_version: "{{ ansible_facts.lsb.major_release }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user