From e7d89006fc6823def98e06def44efc349b164292 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Sun, 22 Jan 2023 11:44:41 +0100 Subject: [PATCH] Fix var reference;Fix task order;Fix block scalar --- .../bootstrap/roles/metacluster/tasks/kube-vip.yml | 4 ++-- .../bootstrap/roles/metacluster/tasks/main.yml | 2 +- .../files/ansible_payload/common/roles/network/tasks/main.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/kube-vip.yml b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/kube-vip.yml index 86ca25a..329942e 100644 --- a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/kube-vip.yml +++ b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/kube-vip.yml @@ -1,5 +1,5 @@ - name: Generate kube-vip manifest - ansible.builtin.command: + ansible.builtin.shell: cmd: >- ctr run --rm --net-host ghcr.io/kube-vip/kube-vip:{{ components.kubevip.version }} vip \ /kube-vip manifest daemonset \ @@ -16,7 +16,7 @@ - name: Inject manifests ansible.builtin.copy: dest: /var/lib/rancher/k3s/server/manifests/kubevip-manifest.yaml - content: >- + content: | {{ lookup('ansible.builtin.file', '/opt/metacluster/kube-vip/rbac.yaml') }} --- {{ kubevip_manifest.stdout }} diff --git a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/main.yml b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/main.yml index 8887e0e..1fb25a3 100644 --- a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/main.yml +++ b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/main.yml @@ -1,7 +1,7 @@ - import_tasks: init.yml - import_tasks: k3s.yml -- import_tasks: kube-vip.yml - import_tasks: assets.yml +- import_tasks: kube-vip.yml - import_tasks: ingress.yml - import_tasks: storage.yml - import_tasks: certauthority.yml diff --git a/ansible/roles/firstboot/files/ansible_payload/common/roles/network/tasks/main.yml b/ansible/roles/firstboot/files/ansible_payload/common/roles/network/tasks/main.yml index cde402b..63f3f06 100644 --- a/ansible/roles/firstboot/files/ansible_payload/common/roles/network/tasks/main.yml +++ b/ansible/roles/firstboot/files/ansible_payload/common/roles/network/tasks/main.yml @@ -8,7 +8,7 @@ dest: /etc/netplan/00-installer-config.yaml vars: _template: - macaddress: "{{ ansible_facts.ansible_facts.default_ipv4.macaddress }}" + macaddress: "{{ ansible_facts.default_ipv4.macaddress }}" ipaddress: "{{ vapp['guestinfo.ipaddress'] }}" prefixlength: "{{ vapp['guestinfo.prefixlength'] }}" gateway: "{{ vapp['guestinfo.gateway'] }}"