]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
config: clean template, remove useless conditions
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 9 Aug 2018 08:44:34 +0000 (10:44 +0200)
committerSébastien Han <seb@redhat.com>
Mon, 13 Aug 2018 08:04:24 +0000 (10:04 +0200)
commitdb29b5b84dbc6f4a940f2da6c5f1e68547a91f4a
tree55e76262b49ea89ec03286ec908762f4e582697a
parent4522dbfc74a538bf7949f14f5c90819b78945d76
config: clean template, remove useless conditions

there is no need to have all these conditions.

for instance, assuming `mds_group_name` is set to 'mdss':

  - `if groups[mds_group_name] is defined` checks if `'mdss'` is present in `{{ groups }}`

  - `if {{ mds_group_name }} in group_names` checks if the current node is part
  the group `'mdss'`

  - `if inventory_hostname in groups.get(mds_group_name, [])` checks if
  the current node is part of the group 'mdss'

The third condition is enough to cover the need of ensuring we are
running on a mds node.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-config/templates/ceph.conf.j2