Hi
You can use require and notify within the package resource to run exec statements.
e.g. (untested)
exec { 'disable':
command => '/path/to/resolvconf --disable-updates',
onlyif => 'dpkg -l | grep -c unbound | wc -l',
}
exec { 'enable':
command => '/path/tp/resolvconf --enable-updates',
unless => 'dpkg -l | grep -c unbound | wc -l',
}
package { 'unbound':
requires => Exec['disable'],
notify => Exec['enable'],
}
- Martin