mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2025-12-25 18:23:05 +01:00
Test playbook using molecule (#67)
* Test cluster using molecule * Fix detection of first control node * Include --flannel-iface and --node-ip as k3s arguments * Store logs of k3s-init.service as GitHub job artifacts
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: Create temporary directory for kubecfg
|
||||
ansible.builtin.tempfile:
|
||||
state: directory
|
||||
suffix: kubecfg
|
||||
register: kubecfg
|
||||
- name: Gathering facts
|
||||
delegate_to: "{{ groups['master'][0] }}"
|
||||
ansible.builtin.gather_facts:
|
||||
- name: Download kubecfg
|
||||
ansible.builtin.fetch:
|
||||
src: "{{ ansible_env.HOME }}/.kube/config"
|
||||
dest: "{{ kubecfg.path }}/"
|
||||
flat: true
|
||||
delegate_to: "{{ groups['master'][0] }}"
|
||||
delegate_facts: true
|
||||
- name: Store path to kubecfg
|
||||
ansible.builtin.set_fact:
|
||||
kubecfg_path: "{{ kubecfg.path }}/config"
|
||||
Reference in New Issue
Block a user