diff --git a/curl_execute.yaml b/curl_execute.yaml index 5fd8a19..8d5d25b 100644 --- a/curl_execute.yaml +++ b/curl_execute.yaml @@ -2,6 +2,10 @@ - name: Curl and execute scripts on target machine hosts: target_hosts become: yes # Use sudo if needed + vars: + script_params: + ip: "192.168.1.100" + prune: "false" tasks: - name: Convert params dictionary to command line arguments set_fact: diff --git a/test-scripts/install_k8s.sh b/test-scripts/install_k8s.sh index 6d2029e..41f8837 100644 --- a/test-scripts/install_k8s.sh +++ b/test-scripts/install_k8s.sh @@ -41,7 +41,7 @@ while [ $# -gt 0 ]; do shift 2 ;; -prune | --prune) - PRUNE=true + PRUNE="$2" shift 2 ;; *) @@ -95,7 +95,7 @@ check_existing_cluster() { if command_exists kubectl && kubectl cluster-info &>/dev/null; then echo "Found existing installation" echo "Proceed to clean em UP" - if [[ $PRUNE != true ]]; then + if [[ $PRUNE != "true" ]]; then echo "Kubernetes cluster removal skipped. Exiting script." exit 0 fi