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:
Dani Hodovic 2023-12-11 19:31:13 -03:00 committed by GitHub
parent 1c11767619
commit fdaba90bb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -117,7 +117,7 @@
changed_when: false
- 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:
path: "{{ kubeconfig }}"
regexp: 'name: default'
@ -126,7 +126,7 @@
become: false
- 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: |
TFILE=$(mktemp)
KUBECONFIG=~/.kube/config.new kubectl rename-context default k3s-ansible