Fix call to ensure deleted nodes are deleted from /etc/hosts

The create_resources function needs a hash provided to it and we
currently store deleted nodes as an array of strings. This change
updates the logic to use ensure_resource(), which accepts an
array of host titles.

Change-Id: I6f6b87db71c93347a46fa543ed0c18ef8b102394
Closes-Bug: #1582263
This commit is contained in:
Alex Schultz 2016-05-16 11:43:56 -06:00 committed by Matthew Mosesohn
parent 9ad4d03c80
commit 90f2e19a92
1 changed files with 1 additions and 1 deletions

View File

@ -18,6 +18,6 @@ class osnailyfacter::hosts::hosts {
create_resources(host, $host_hash)
if !empty($deleted_nodes) {
create_resources(host, concat($deleted_nodes, $deleted_messaging_nodes), {ensure => absent})
ensure_resource(host, unique(concat($deleted_nodes, $deleted_messaging_nodes)), {ensure => absent})
}
}