How to use pupppet to get all the list of node names available in site.pp
and use it in another module which is imported in site.pp
For example
site.pp
-
node1 { 'first_node':
a = 'hello'
}
node2 { 'second_node':
b = 'hai'
}
import new_module.pp
new_module.pp
exec {'ls':
command = ls,
path = /usr/bin:/bin,
provider = shell,
}
So the output of ls contains files/directories, these should be stored in
a array for suppose $my_array and it should be used globally in the
module.
Can any one help me in this
--
You received this