From 1de8176bf4f28e41a48b7a3fd8ded23cef4f30a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Fri, 9 Dec 2016 14:45:05 +0100 Subject: [PATCH] common: move mandatory variables to their respective roles MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- .../tasks/checks/check_mandatory_vars.yml | 23 ------------------- roles/ceph-osd/tasks/check_mandatory_vars.yml | 10 ++++++++ 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/roles/ceph-common/tasks/checks/check_mandatory_vars.yml b/roles/ceph-common/tasks/checks/check_mandatory_vars.yml index aa3ecd930..b5d745c81 100644 --- a/roles/ceph-common/tasks/checks/check_mandatory_vars.yml +++ b/roles/ceph-common/tasks/checks/check_mandatory_vars.yml @@ -31,26 +31,3 @@ - ceph_origin == "upstream" tags: - package-install - -- name: make sure monitor_interface or monitor_address or monitor_address_block is configured - fail: - msg: "Either monitor_interface, monitor_address, or monitor_address_block must be configured. Interface for the monitor to listen on or IP address of that interface" - when: - - monitor_interface == 'interface' - - monitor_address == '0.0.0.0' - - not monitor_address_block - - mon_group_name in group_names - -- name: make sure cluster_network configured - fail: - msg: "cluster_network must be configured. Ceph replication network" - when: - - cluster_network == '0.0.0.0/0' - - osd_group_name in group_names - -- name: make sure public_network configured - fail: - msg: "public_network must be configured. Ceph public network" - when: - - public_network == '0.0.0.0/0' - - osd_group_name in group_names diff --git a/roles/ceph-osd/tasks/check_mandatory_vars.yml b/roles/ceph-osd/tasks/check_mandatory_vars.yml index 537c820df..a60b819e6 100644 --- a/roles/ceph-osd/tasks/check_mandatory_vars.yml +++ b/roles/ceph-osd/tasks/check_mandatory_vars.yml @@ -1,4 +1,14 @@ --- +- name: make sure public_network configured + fail: + msg: "public_network must be configured. Ceph public network" + when: public_network == '0.0.0.0/0' + +- name: make sure cluster_network configured + fail: + msg: "cluster_network must be configured. Ceph replication network" + when: cluster_network == '0.0.0.0/0' + - name: make sure journal_size configured debug: msg: "WARNING: journal_size is configured to less than 5GB. This is not recommended and can lead to severe issues." -- 2.39.5