-
Notifications
You must be signed in to change notification settings - Fork 528
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
If user passes running => false, then the enable flag for the service should be false too #308
Comments
Related to #309 as well. |
Does it make sense to have running and enable be considered separately? The current behavior is that when running == false, then enable will equal false. If running == true, then enabled will equal true. In our use case, we're running puppet when baking an AMI and we don't want these services starting until the first boot of an EC2 instance built from the AMI. Because of this, we would like to be able to set enabled to true and ensure that the container services are stopped. We're working on a pull request that will support our use case. We can take into account that the default should be enable == running, but we'd like enabled to be override-able. |
In our use case, we're running puppet when baking an AMI and we don't want these services starting until the first boot of an EC2 instance built from the AMI. Because of this, we would like to be able to set enabled to true and ensure that the container services are stopped. Do you only run puppet to build a host and after reboot it doesn't ever run again? Because otherwise puppet will stop your containers the next time it runs because you have ensure=> stopped. Sounds like they should be overrideable regardless. |
I'm working with @jniesen at the moment. @lorijean44 yes. The pattern of immutable infrastructure, and just using Puppet to "bake" an immutable image (docker image, AMI, etc.) is getting quite common. We use pretty much all "cloud" infrastructure, so we're not using Puppet to build a "host", we're building an image/template that then gets deployed. |
It looks like this was partially done in 5.1. Now it says "if $manage_service is true, and running is false, then the docker service is set to ensure false, and enable false. Then later if running is true, then ensure is set to true and enable is set to true. So it doesn't quite do what @jniesen and @jantman were asking for. (But it does handle my scenario). |
The service block for the container is hardcoded to enable => true. If the user passes running => false, then enable should not get set to true.
I would say enable should default to false if running is set to false.
Maybe something like:
The text was updated successfully, but these errors were encountered: