ceph_chef_mon_nodes

in libraries/ceph_chef_helper.rb [626:640]


def ceph_chef_mon_nodes
  results = nil
  if node['ceph']['search_by_environment']
    results = search(:node, ceph_chef_mon_env_search_string)
  else
    results = search(:node, "tags:#{node['ceph']['mon']['tag']}")
    if !results.include?(node) && node.run_list.roles.include?(node['ceph']['mon']['role'])
      results.push(node)
    end
  end

  results.map! { |x| x['hostname'] == node['hostname'] ? node : x }
  results.sort! { |a, b| a['hostname'] <=> b['hostname'] }
end