mirror of https://github.com/ceph/ceph-ansible.git
ceph-dashboard: remove rgw api host,port,scheme
We don't need to have dedicated variables for the RGW integration into
the Ceph Dashboard and need to be manually filled.
Instead we can use the current values from the RGW nodes by using the
IP and port from the first RGW instance of the first RGW node via the
radosgw_address and radosgw_frontend_port variables.
We don't need to specify all RGW nodes, this will be done automatically
with one node.
The RGW api scheme is using the radosgw_frontend_ssl_certificate variable
to determine if the value is http or https. This variable is also reuse
as a condition for the ssl verify task.
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit b9e93ad7a6
)
pull/4557/head
parent
b325cc386e
commit
d617626ef4
|
@ -711,9 +711,6 @@ dummy:
|
||||||
#dashboard_crt: ''
|
#dashboard_crt: ''
|
||||||
#dashboard_key: ''
|
#dashboard_key: ''
|
||||||
#dashboard_rgw_api_user_id: ceph-dashboard
|
#dashboard_rgw_api_user_id: ceph-dashboard
|
||||||
#dashboard_rgw_api_host: ''
|
|
||||||
#dashboard_rgw_api_port: ''
|
|
||||||
#dashboard_rgw_api_scheme: ''
|
|
||||||
#dashboard_rgw_api_admin_resource: ''
|
#dashboard_rgw_api_admin_resource: ''
|
||||||
#dashboard_rgw_api_no_ssl_verify: False
|
#dashboard_rgw_api_no_ssl_verify: False
|
||||||
#node_exporter_container_image: prom/node-exporter:latest
|
#node_exporter_container_image: prom/node-exporter:latest
|
||||||
|
|
|
@ -711,9 +711,6 @@ ceph_docker_registry_auth: true
|
||||||
#dashboard_crt: ''
|
#dashboard_crt: ''
|
||||||
#dashboard_key: ''
|
#dashboard_key: ''
|
||||||
#dashboard_rgw_api_user_id: ceph-dashboard
|
#dashboard_rgw_api_user_id: ceph-dashboard
|
||||||
#dashboard_rgw_api_host: ''
|
|
||||||
#dashboard_rgw_api_port: ''
|
|
||||||
#dashboard_rgw_api_scheme: ''
|
|
||||||
#dashboard_rgw_api_admin_resource: ''
|
#dashboard_rgw_api_admin_resource: ''
|
||||||
#dashboard_rgw_api_no_ssl_verify: False
|
#dashboard_rgw_api_no_ssl_verify: False
|
||||||
node_exporter_container_image: registry.redhat.io/openshift4/ose-prometheus-node-exporter:v4.1
|
node_exporter_container_image: registry.redhat.io/openshift4/ose-prometheus-node-exporter:v4.1
|
||||||
|
|
|
@ -147,25 +147,22 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: set the rgw host
|
- name: set the rgw host
|
||||||
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard set-rgw-api-host {{ dashboard_rgw_api_host }}"
|
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard set-rgw-api-host {{ hostvars[groups[rgw_group_name][0]]['rgw_instances'][0]['radosgw_address'] }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
when: dashboard_rgw_api_host != ''
|
|
||||||
|
|
||||||
- name: set the rgw port
|
- name: set the rgw port
|
||||||
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard set-rgw-api-port {{ dashboard_rgw_api_port }}"
|
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard set-rgw-api-port {{ hostvars[groups[rgw_group_name][0]]['rgw_instances'][0]['radosgw_frontend_port'] }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
when: dashboard_rgw_api_port != ''
|
|
||||||
|
|
||||||
- name: set the rgw scheme
|
- name: set the rgw scheme
|
||||||
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard set-rgw-api-scheme {{ dashboard_rgw_api_scheme }}"
|
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard set-rgw-api-scheme {{ 'https' if radosgw_frontend_ssl_certificate else 'http' }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
when: dashboard_rgw_api_scheme != ''
|
|
||||||
|
|
||||||
- name: set the rgw admin resource
|
- name: set the rgw admin resource
|
||||||
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard set-rgw-api-admin-resource {{ dashboard_rgw_api_admin_resource }}"
|
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard set-rgw-api-admin-resource {{ dashboard_rgw_api_admin_resource }}"
|
||||||
|
@ -179,7 +176,9 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
when: dashboard_rgw_api_no_ssl_verify | bool
|
when:
|
||||||
|
- dashboard_rgw_api_no_ssl_verify | bool
|
||||||
|
- radosgw_frontend_ssl_certificate | length > 0
|
||||||
|
|
||||||
- name: disable mgr dashboard module (restart)
|
- name: disable mgr dashboard module (restart)
|
||||||
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} mgr module disable dashboard"
|
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} mgr module disable dashboard"
|
||||||
|
|
|
@ -703,9 +703,6 @@ dashboard_admin_password: admin
|
||||||
dashboard_crt: ''
|
dashboard_crt: ''
|
||||||
dashboard_key: ''
|
dashboard_key: ''
|
||||||
dashboard_rgw_api_user_id: ceph-dashboard
|
dashboard_rgw_api_user_id: ceph-dashboard
|
||||||
dashboard_rgw_api_host: ''
|
|
||||||
dashboard_rgw_api_port: ''
|
|
||||||
dashboard_rgw_api_scheme: ''
|
|
||||||
dashboard_rgw_api_admin_resource: ''
|
dashboard_rgw_api_admin_resource: ''
|
||||||
dashboard_rgw_api_no_ssl_verify: False
|
dashboard_rgw_api_no_ssl_verify: False
|
||||||
node_exporter_container_image: prom/node-exporter:latest
|
node_exporter_container_image: prom/node-exporter:latest
|
||||||
|
|
Loading…
Reference in New Issue