Recommended fix would be to not use the @hook('install') decorator, and instead use normal states.
Instead of:
@when('prometheus.do-install') def install_packages(): [...] reactive.remove_state('prometheus.do-install')
Have instead:
@when_not('prometheus.installed') def install_packages(): [...] reactive.set_state('prometheus.installed')
You can then remove the @hook('install') handler entirely, and the install_packages handler will run in the first hook (even if it is a storage hook).
Recommended fix would be to not use the @hook('install') decorator, and instead use normal states.
Instead of:
@when(' prometheus. do-install' ) remove_ state(' prometheus. do-install' )
def install_packages():
[...]
reactive.
Have instead:
@when_not( 'prometheus. installed' ) set_state( 'prometheus. installed' )
def install_packages():
[...]
reactive.
You can then remove the @hook('install') handler entirely, and the install_packages handler will run in the first hook (even if it is a storage hook).