-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Control from pillar if the service is running and enabled #42
base: master
Are you sure you want to change the base?
Control from pillar if the service is running and enabled #42
Conversation
@dnABic can you rebase against master to see if that changes the tests pass/fail? |
@myoung34 the changes made test to pass. |
I recommend using |
@blbradley Im torn on that, because I can actually see the value if he doesnt run salt post-AMI (as I do not). I use it purely to build, not to manage, so on AMI creation my last steps are to remove salt to save some memory. @dnABic fwiw Im using this formula as is with a very very generic placeholder
To clean up node data so that when I spin it up elasticsearch is fresh. |
@myoung34 If you used just rabbitmq-formula seems to have used this pattern because their I'm not against this change. Just providing an alternative. I see lots of feature flags popping up in formulas in situations where a subset of the formula's states can be used instead. This feature flag creep comes from users that want to edit their pillar not under source control vs editing states under version control: ✋ (hand raise as one of those users). |
It definitely is a smell, the workaround I have would be more viable. I agree, importing a service state should have a consistent behavior, and should both enable and start a service. Not sure Id merge this but instead use my workaround |
Making it possible to control from pillars if service is running and / or enabled. The idea is identical to the one in rabbitmq formula: https://github.com/saltstack-formulas/rabbitmq-formula
In my use case, I create an AWS image where I use this saltstack formula to install elasticsearch. Still, at this point I don't know final configuration and therefore I don't want that elasticsearch runs.
In latter steps, I create aws ec2 instance of previously created image. Then salt stack will do the final configuration of elasticsearch and finally start the service.