Skip to content

Commit

Permalink
add teardown_database flag
Browse files Browse the repository at this point in the history
add teardown_database flag, covers cases where framework didn't provision db and we don't want a teardown, user will take responsibility.
Signed-off-by: Chuck Levesque <[email protected]>
  • Loading branch information
clevesque committed Dec 16, 2023
1 parent 40661e4 commit 751e415
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion roles/teardown/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@
password: "{{ cloudera_manager_database_password }}"
type: "{{ cloudera_manager_database_type }}"
port: "{{ cloudera_manager_database_port }}"
when: teardown_everything | default(false)
when:
- teardown_everything | default(false)
- teardown_database | default(true)

- name: Stop Haproxy
service:
Expand Down
1 change: 1 addition & 0 deletions roles/teardown/tasks/teardown_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@
loop_var: database
run_once: true
when:
- teardown_database | default(true)
- cluster.services is defined
- database.key in cluster.services
1 change: 1 addition & 0 deletions roles/teardown/tasks/teardown_cms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
loop_var: database
run_once: true
when:
- teardown_database | default(true)
- definition.mgmt.services is defined
- database.key in definition.mgmt.services

Expand Down

0 comments on commit 751e415

Please sign in to comment.