From 169e8a89135fa996f6d63176f41a9b2eea08001d Mon Sep 17 00:00:00 2001 From: savagebidoof Date: Thu, 7 Mar 2024 05:19:58 +0100 Subject: [PATCH] Fixed issues with variables (looping), so renamed them to _var --- ksetup/playbook.yaml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ksetup/playbook.yaml b/ksetup/playbook.yaml index 39a67c7..7932c87 100755 --- a/ksetup/playbook.yaml +++ b/ksetup/playbook.yaml @@ -24,13 +24,16 @@ _kubeadm_join_command: "" # Placeholder # Others - is_proxmox_vm: "{{ is_proxmox_vm }} | default(false) | bool" - setup_only: "{{ setup_only }} | default(false) | bool" # Prevent creating/joining a cluster + _is_master: "{{ is_master | default('false') | bool }}" # Prevent creating/joining a cluster + _is_proxmox_vm: "{{ is_proxmox_vm | default('false') | bool }}" # Prevent creating/joining a cluster + _setup_only: "{{ setup_only | default('false') | bool }}" # Prevent creating/joining a cluster tasks: -# - check vars +# check vars - debug: var=set_hostname - - debug: var=is_master + - debug: var=_is_master + - debug: var=_is_proxmox_vm + - debug: var=_setup_only - name: Ping check ping: @@ -40,16 +43,16 @@ import_tasks: tasks_prepare_node.yaml become: true -# If is_master: init +# If _is_master: init - name: init cluster import_tasks: tasks_master.yaml - when: is_master and not setup_only + when: _is_master and not setup_only become: true # else: join - name: join cluster import_tasks: tasks_slave.yaml - when: not is_master and not setup_only + when: not _is_master and not setup_only # Do other stuff - name: post setup