Skip to content

Commit

Permalink
pre-check decapod flags
Browse files Browse the repository at this point in the history
to make sure only one flag is set
  • Loading branch information
robertchoi80 committed Jul 2, 2021
1 parent 9a1b83f commit bc370d2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
3 changes: 2 additions & 1 deletion roles/decapod/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ argo_workflow_executor_image_repo: "argoproj/argoexec"
argo_workflow_server_image_registry: {{ quay_image_repo }}
argo_workflow_server_image_repo: "argoproj/argocli"

#TODO: Currently not used values. Override these if necessary
argo_workflow_server_node_selector: null
argo_workflow_controller_node_selector: null

argo_workflow_controller_persistence_postgres_host: "172.16.50.85"
argo_workflow_controller_persistence_postgres_host: ""
argo_workflow_controller_persistence_postgres_port: 5432
argo_workflow_controller_persistence_postgres_database: "postgres"
argo_workflow_controller_persistence_postgres_tablename: "argo_workflows"
Expand Down
7 changes: 7 additions & 0 deletions roles/decapod/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
---
- name: fail if decapod flags are both set
fail:
msg: "Error! Both decapod_enabled and decapod_with_db_enabled are set. Pick one!"
when:
- decapod_enabled
- decapod_with_db_enabled

- name: set facts for prepare role
set_fact:
argo_version: "{{ argo_version }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@
- not allow_redeployment
- stat_kubeconfig_result.stat.exists
- stat_cc_result.rc == 0

- name: fail if decapod flags are both set
fail:
msg: "Error! Both decapod_enabled and decapod_with_db_enabled are set. Pick one!"
when:
- decapod_enabled
- decapod_with_db_enabled
2 changes: 1 addition & 1 deletion site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
roles:
- { role: kubespray/roles/kubespray-defaults, tags: setup-os }
- { role: validate-cluster, tags: setup-os }
- { role: validate, tags: setup-os }

- name: setup host operating systems in taco host group
hosts: taco
Expand Down

0 comments on commit bc370d2

Please sign in to comment.