saltstack-formulas / php-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
57 stars 231 forks source link

Trigger web server reload if neccessary #162

Open getSurreal opened 5 years ago

getSurreal commented 5 years ago

Is there a setting I'm missing that will already allow this? For instance when I add php.ng.mysql. I have to manually reload apache. I know people run different web servers, but maybe that information could be passed as pillar data so it knows which service to reload.

alxwr commented 5 years ago

@getSurreal The main issue will be determining how to trigger the reload. I propose we make that configurable:

aboe76 commented 5 years ago

@getSurreal this is a difficult thing to accomplish,

You need to know if the webserver is managed by a salt-formula to use if it is apache-formula just require_in apache-reload if it is nginx-formula you need to know if nginx or nginx:ng. both have different extends...to reload the service.

I would opt for the simpler solution: get a dict from pillar: which webserver with which command. and then create a saltstack state based on the two values.