From 01b80e091e393f6bab42bcbb4707ef9e8715f16b Mon Sep 17 00:00:00 2001 From: Boris Ranto Date: Sat, 28 Jul 2018 01:48:19 +0200 Subject: [PATCH] ansible: Support non-default cluster name Signed-off-by: Boris Ranto --- ansible/group_vars/all.yml.sample | 2 ++ ansible/roles/ceph-mgr/tasks/main.yml | 2 +- ansible/roles/cephmetrics-common/defaults/main.yml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ansible/group_vars/all.yml.sample b/ansible/group_vars/all.yml.sample index 11820ed..0358916 100644 --- a/ansible/group_vars/all.yml.sample +++ b/ansible/group_vars/all.yml.sample @@ -1,5 +1,7 @@ dummy: +#cluster_name: ceph + #containerized: true # Set the backend options, mgr+prometheus or cephmetrics+graphite diff --git a/ansible/roles/ceph-mgr/tasks/main.yml b/ansible/roles/ceph-mgr/tasks/main.yml index 0a3617f..172ed7d 100644 --- a/ansible/roles/ceph-mgr/tasks/main.yml +++ b/ansible/roles/ceph-mgr/tasks/main.yml @@ -25,4 +25,4 @@ when: container_name != "" - name: Enable mgr prometheus module - command: "{{ mgr_prefix|default('') }} ceph mgr module enable prometheus" + command: "{{ mgr_prefix|default('') }} ceph --cluster {{ cluster_name }} mgr module enable prometheus" diff --git a/ansible/roles/cephmetrics-common/defaults/main.yml b/ansible/roles/cephmetrics-common/defaults/main.yml index a7266b6..10f7d8b 100644 --- a/ansible/roles/cephmetrics-common/defaults/main.yml +++ b/ansible/roles/cephmetrics-common/defaults/main.yml @@ -1,5 +1,6 @@ --- defaults: + cluster_name: ceph containerized: true backend: metrics: mgr # mgr, cephmetrics -- 2.47.3