Skip to content

Commit

Permalink
Make 'disable ssl for dashboard task' idempotent.
Browse files Browse the repository at this point in the history
This should reduce number of 'changed' tasks during convergence test.

Signed-off-by: George Shuklin <george.shuklin@gmail.com>
(cherry picked from commit 73d4bb6)
  • Loading branch information
amarao authored and guits committed Aug 20, 2020
1 parent 21a37e2 commit c0d9887
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions roles/ceph-dashboard/tasks/configure_dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@
when: containerized_deployment | bool

- name: disable SSL for dashboard
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} config set mgr mgr/dashboard/ssl false"
delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: true
when: dashboard_protocol == "http"
delegate_to: "{{ groups[mon_group_name][0] }}"
block:
- name: get SSL status for dashboard
run_once: true
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} config get mgr mgr/dashboard/ssl"
changed_when: false
register: current_ssl_for_dashboard

- name: disable SSL for dashboard
run_once: true
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} config set mgr mgr/dashboard/ssl false"
when: current_ssl_for_dashboard.stdout == "true"

- name: with SSL for dashboard
when: dashboard_protocol == "https"
Expand Down

0 comments on commit c0d9887

Please sign in to comment.