diff --git a/deployment/puppet/osnailyfacter/lib/puppet/parser/functions/get_nodes_hash_by_roles.rb b/deployment/puppet/osnailyfacter/lib/puppet/parser/functions/get_nodes_hash_by_roles.rb index 3c253025fe..7f20ab8c93 100644 --- a/deployment/puppet/osnailyfacter/lib/puppet/parser/functions/get_nodes_hash_by_roles.rb +++ b/deployment/puppet/osnailyfacter/lib/puppet/parser/functions/get_nodes_hash_by_roles.rb @@ -12,7 +12,7 @@ EOS raise(Puppet::ParseError, "#{errmsg}: 2nd argument should be an list of roles") if !roles.is_a?(Array) nodes = n_metadata['nodes'] nodes.reject do |node_name| - (roles & nodes[node_name]['network_roles']).empty? + (roles & nodes[node_name]['node_roles']).empty? end end end diff --git a/deployment/puppet/osnailyfacter/spec/functions/get_nodes_hash_by_roles__spec.rb b/deployment/puppet/osnailyfacter/spec/functions/get_nodes_hash_by_roles__spec.rb index d7b1d57d33..804bd97330 100644 --- a/deployment/puppet/osnailyfacter/spec/functions/get_nodes_hash_by_roles__spec.rb +++ b/deployment/puppet/osnailyfacter/spec/functions/get_nodes_hash_by_roles__spec.rb @@ -7,18 +7,18 @@ YAML.load(" --- nodes: node-55: - network_roles: + node_roles: - controller - mongo - cinder node-66: - network_roles: + node_roles: - compute - cinder - xxx - yyy node-77: - network_roles: + node_roles: - mongo - cinder - xxx