I have ModuleC and there i have something like::
class moduleC (
Enum['present', 'absent']
$ensure = 'present',
) {
if $ensure == 'present' {
# do the stuff to build your module
} else {
file {'C:\\A\C':
ensure => 'absent',
}
}
}
Now NodeX has this ModuleC which is in configGroup->HostGroup and It works.
When I change the HostGroup of the NodeX I want remove also the files which this module created on NodeX.
How can I pass absent to the $ensure variable on the class ?
Or if one have better idea please let me know.
Thanks in advance