]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
make mandatory variable checks only apply when needed 548/head
authorAndrew Schoen <aschoen@redhat.com>
Mon, 15 Feb 2016 21:29:06 +0000 (15:29 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 16 Feb 2016 16:43:36 +0000 (10:43 -0600)
In our use case we might only be configuring mons and not osds in the
same call, so we don't want to check variables needed for osds when they
are not needed to configure a mon.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
roles/ceph-common/tasks/checks/check_mandatory_vars.yml

index 2cad7df3dc7683a6d14bdbdcc35fb741fe40686b..a5d03b984811ff31dc4ee3aa078f6dd73e53e31f 100644 (file)
 - name: make sure journal_size configured
   fail:
     msg: "journal_size must be configured. See http://ceph.com/docs/master/rados/configuration/osd-config-ref/"
-  when: journal_size|int == 0
+  when:
+    journal_size|int == 0 and
+    osd_group_name in group_names
 
 - name: make sure monitor_interface configured
   fail:
     msg: "monitor_interface must be configured. Interface for the monitor to listen on"
-  when: monitor_interface == 'interface'
+  when:
+    monitor_interface == 'interface' and
+    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'
+  when:
+    cluster_network == '0.0.0.0/0' and
+    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'
+  when:
+    public_network == '0.0.0.0/0' and
+    osd_group_name in group_names
 
 - name: make sure an osd scenario was chosen
   fail: