mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-25 00:12:37 +01:00
fix: yaml conditional logic (#273)
Running the playbook with version 2.16.1 Replace `&&` with `and` Signed-off-by: Dani Hodovic <dani.hodovic@gmail.com>
This commit is contained in:
@@ -117,7 +117,7 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Setup kubeconfig k3s-ansible context
|
- name: Setup kubeconfig k3s-ansible context
|
||||||
when: kubeconfig == "~/.kube/config.new" && kubectl_installed.rc == 0
|
when: kubeconfig == "~/.kube/config.new" and kubectl_installed.rc == 0
|
||||||
ansible.builtin.replace:
|
ansible.builtin.replace:
|
||||||
path: "{{ kubeconfig }}"
|
path: "{{ kubeconfig }}"
|
||||||
regexp: 'name: default'
|
regexp: 'name: default'
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
become: false
|
become: false
|
||||||
|
|
||||||
- name: Merge with any existing kube config
|
- name: Merge with any existing kube config
|
||||||
when: kubeconfig == "~/.kube/config.new" && kubectl_installed.rc == 0
|
when: kubeconfig == "~/.kube/config.new" and kubectl_installed.rc == 0
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
TFILE=$(mktemp)
|
TFILE=$(mktemp)
|
||||||
KUBECONFIG=~/.kube/config.new kubectl rename-context default k3s-ansible
|
KUBECONFIG=~/.kube/config.new kubectl rename-context default k3s-ansible
|
||||||
|
|||||||
Reference in New Issue
Block a user