Remove handler from non-firstboot steps;Fix kubeconfig order/logic
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c57291af6d
commit
fdc5c44e6a
@ -19,4 +19,5 @@
|
|||||||
kubernetes.core.k8s:
|
kubernetes.core.k8s:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
|
kubeconfig: "{{ kubeconfig.path }}"
|
||||||
with_fileglob: /var/lib/rancher/k3s/server/manifests/*.yaml
|
with_fileglob: /var/lib/rancher/k3s/server/manifests/*.yaml
|
||||||
|
@ -13,6 +13,23 @@
|
|||||||
INSTALL_K3S_EXEC: 'server --cluster-init --disable local-storage'
|
INSTALL_K3S_EXEC: 'server --cluster-init --disable local-storage'
|
||||||
when: ansible_facts.services['k3s.service'] is undefined
|
when: ansible_facts.services['k3s.service'] is undefined
|
||||||
|
|
||||||
|
- name: Initialize tempfile
|
||||||
|
ansible.builtin.tempfile:
|
||||||
|
state: file
|
||||||
|
register: kubeconfig
|
||||||
|
|
||||||
|
- name: Retrieve kubeconfig
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: kubectl config view --raw
|
||||||
|
register: kubectl_config
|
||||||
|
|
||||||
|
- name: Store kubeconfig in tempfile
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: "{{ kubeconfig.path }}"
|
||||||
|
content: "{{ kubectl_config.stdout }}"
|
||||||
|
mode: 0600
|
||||||
|
no_log: true
|
||||||
|
|
||||||
- name: Configure traefik dashboard ingress
|
- name: Configure traefik dashboard ingress
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: ingressroute.j2
|
src: ingressroute.j2
|
||||||
@ -55,25 +72,6 @@
|
|||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: kubectl completion bash | tee /etc/bash_completion.d/kubectl
|
cmd: kubectl completion bash | tee /etc/bash_completion.d/kubectl
|
||||||
|
|
||||||
- block:
|
|
||||||
|
|
||||||
- name: Initialize tempfile
|
|
||||||
ansible.builtin.tempfile:
|
|
||||||
state: file
|
|
||||||
register: kubeconfig
|
|
||||||
|
|
||||||
- name: Retrieve kubeconfig
|
|
||||||
ansible.builtin.command:
|
|
||||||
cmd: kubectl config view --raw
|
|
||||||
register: kubectl_config
|
|
||||||
|
|
||||||
- name: Store kubeconfig in tempfile
|
|
||||||
ansible.builtin.copy:
|
|
||||||
dest: "{{ kubeconfig.path }}"
|
|
||||||
content: "{{ kubectl_config.stdout }}"
|
|
||||||
mode: 0600
|
|
||||||
no_log: true
|
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
|
||||||
- name: Extract container images
|
- name: Extract container images
|
||||||
|
@ -66,11 +66,6 @@
|
|||||||
# loop: "{{ lookup('ansible.builtin.dict', components) | map(attribute='value.manifests') | list | select('defined') | flatten }}"
|
# loop: "{{ lookup('ansible.builtin.dict', components) | map(attribute='value.manifests') | list | select('defined') | flatten }}"
|
||||||
# loop_control:
|
# loop_control:
|
||||||
# label: "{{ item.type + '/' + item.name }}"
|
# label: "{{ item.type + '/' + item.name }}"
|
||||||
# notify:
|
|
||||||
# - Apply manifests
|
|
||||||
|
|
||||||
# - name: Trigger handlers
|
|
||||||
# ansible.builtin.meta: flush_handlers
|
|
||||||
|
|
||||||
- name: Compress tarballs
|
- name: Compress tarballs
|
||||||
community.general.archive:
|
community.general.archive:
|
||||||
|
@ -38,8 +38,3 @@
|
|||||||
loop: "{{ platform.packaged_components }}"
|
loop: "{{ platform.packaged_components }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.name }}"
|
label: "{{ item.name }}"
|
||||||
notify:
|
|
||||||
- Apply manifests
|
|
||||||
|
|
||||||
- name: Trigger handlers
|
|
||||||
ansible.builtin.meta: flush_handlers
|
|
||||||
|
Loading…
Reference in New Issue
Block a user