From 9ebef8ba3c486e44c89f9410b2db219d1b54c3f2 Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Mon, 23 Oct 2017 14:35:59 +0100 Subject: [PATCH] Add regexp check for setting CLUSTER_NAME Minor fix to ensure that existing CLUSTER_NAME is changed, and avoid duplicates. --- roles/ceph-common/tasks/configure_cluster_name.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/ceph-common/tasks/configure_cluster_name.yml b/roles/ceph-common/tasks/configure_cluster_name.yml index 318746d98..b02f8ce98 100644 --- a/roles/ceph-common/tasks/configure_cluster_name.yml +++ b/roles/ceph-common/tasks/configure_cluster_name.yml @@ -5,6 +5,7 @@ insertafter: EOF create: yes line: "CLUSTER={{ cluster }}" + regexp: "^CLUSTER=" when: - ansible_os_family == "RedHat" @@ -32,6 +33,7 @@ dest: /etc/default/ceph insertafter: EOF create: yes + regexp: "^CLUSTER=" line: "CLUSTER={{ cluster }}" when: - ansible_os_family == "Debian" @@ -43,6 +45,7 @@ dest: /etc/default/ceph/ceph insertafter: EOF create: yes + regexp: "^CLUSTER=" line: "CLUSTER={{ cluster }}" when: - ansible_os_family == "Debian" -- 2.39.5