From: Dimitri Savineau Date: Thu, 9 Jul 2020 22:38:17 +0000 (-0400) Subject: cephadm-adopt: use custom dashboard images X-Git-Tag: v6.0.0alpha2~128 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f2d997396ea1a87e0304d37502d149570433ae63;p=ceph-ansible.git cephadm-adopt: use custom dashboard images cephadm uses default value for dashboard container images which need to be customized by ansible for upstream or downstream purpose. This feature wasn't present when cephadm-adopt.yml has been designed. Also set the container_image_base variable for upgrade purpose. Signed-off-by: Dimitri Savineau --- diff --git a/infrastructure-playbooks/cephadm-adopt.yml b/infrastructure-playbooks/cephadm-adopt.yml index 6077cbb12..0470da0e2 100644 --- a/infrastructure-playbooks/cephadm-adopt.yml +++ b/infrastructure-playbooks/cephadm-adopt.yml @@ -225,6 +225,36 @@ run_once: true delegate_to: '{{ groups[mon_group_name][0] }}' + - name: set container image base in ceph configuration + command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} config set mgr mgr/cephadm/container_image_base {{ ceph_docker_registry }}/{{ ceph_docker_image }}" + changed_when: false + run_once: true + delegate_to: '{{ groups[mon_group_name][0] }}' + + - name: set dashboard container image in ceph mgr configuration + when: dashboard_enabled | bool + run_once: true + block: + - name: set alertmanager container image in ceph configuration + command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} config set mgr mgr/cephadm/container_image_alertmanager {{ alertmanager_container_image }}" + changed_when: false + delegate_to: '{{ groups[mon_group_name][0] }}' + + - name: set grafana container image in ceph configuration + command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} config set mgr mgr/cephadm/container_image_grafana {{ grafana_container_image }}" + changed_when: false + delegate_to: '{{ groups[mon_group_name][0] }}' + + - name: set node-exporter container image in ceph configuration + command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} config set mgr mgr/cephadm/container_image_node_exporter {{ node_exporter_container_image }}" + changed_when: false + delegate_to: '{{ groups[mon_group_name][0] }}' + + - name: set prometheus container image in ceph configuration + command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} config set mgr mgr/cephadm/container_image_prometheus {{ prometheus_container_image }}" + changed_when: false + delegate_to: '{{ groups[mon_group_name][0] }}' + - name: manage nodes with cephadm command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} orch host add {{ hostvars[item]['ansible_hostname'] }} {{ hostvars[item]['ansible_default_ipv4']['address'] }} {{ hostvars[item]['group_names'] | join(' ') }}" changed_when: false