diff --git a/src/main/groovy/com/rundeck/plugins/ansible/plugin/AnsibleResourceModelSource.java b/src/main/groovy/com/rundeck/plugins/ansible/plugin/AnsibleResourceModelSource.java index 09cc1ec..85c70dd 100644 --- a/src/main/groovy/com/rundeck/plugins/ansible/plugin/AnsibleResourceModelSource.java +++ b/src/main/groovy/com/rundeck/plugins/ansible/plugin/AnsibleResourceModelSource.java @@ -719,7 +719,7 @@ public void ansibleInventoryList(NodeSetImpl nodes, AnsibleRunner.AnsibleRunnerB if (isTagMapValid(all, ALL)) { Map children = InventoryList.getValue(all, CHILDREN); - processChildren(nodes, children, new HashSet<>()); + processChildren(children, new HashSet<>()); } ansibleNodes.forEach((k, node) -> nodes.putNode(node)); @@ -729,12 +729,11 @@ public void ansibleInventoryList(NodeSetImpl nodes, AnsibleRunner.AnsibleRunnerB /** * Processes the given set of nodes and populates the children map with the results. * - * @param nodes the set of nodes to process * @param children a map to be populated with the processed children nodes * @param tags a set of tags to filter the nodes * @throws ResourceModelSourceException if an error occurs while processing the nodes */ - public void processChildren(NodeSetImpl nodes, Map children, HashSet tags) throws ResourceModelSourceException { + public void processChildren(Map children, HashSet tags) throws ResourceModelSourceException { if (!isTagMapValid(children, CHILDREN)) { return; } @@ -747,9 +746,9 @@ public void processChildren(NodeSetImpl nodes, Map children, Has if (hostNames.containsKey(CHILDREN)) { Map subChildren = InventoryList.getValue(hostNames, CHILDREN); - processChildren(nodes, subChildren, tags); + processChildren(subChildren, tags); } else { - processHosts(nodes, hostNames, tags); + processHosts(hostNames, tags); tags.clear(); } } @@ -758,12 +757,11 @@ public void processChildren(NodeSetImpl nodes, Map children, Has /** * Processes the hosts within the given host names map and adds them to the nodes set. * - * @param nodes the set of nodes to populate * @param hostNames the map containing host names and their attributes * @param tags the set of tags to apply to the nodes * @throws ResourceModelSourceException if an error occurs while processing the nodes */ - public void processHosts(NodeSetImpl nodes, Map hostNames, HashSet tags) throws ResourceModelSourceException { + public void processHosts(Map hostNames, HashSet tags) throws ResourceModelSourceException { Map hosts = InventoryList.getValue(hostNames, HOSTS); if (!isTagMapValid(hosts, HOSTS)) { @@ -784,7 +782,6 @@ public void processHosts(NodeSetImpl nodes, Map hostNames, HashS */ public NodeEntryImpl createNodeEntry(Map.Entry hostNode) throws ResourceModelSourceException { NodeEntryImpl node = new NodeEntryImpl(); - //node.setTags(Set.copyOf(tags)); String hostName = hostNode.getKey(); node.setHostname(hostName); node.setNodename(hostName);