cookbook 'dpkg_autostart', '= 0.4.2', :supermarket
dpkg_autostart (15) Versions 0.4.2 Follow11
Control service actions initialized from dpkg
cookbook 'dpkg_autostart', '= 0.4.2'
knife supermarket install dpkg_autostart
knife supermarket download dpkg_autostart
dpkg likes to start services after installation as the Debian convention
dictates. This can be annoying and problematic, especially when you don't
want services to be immediately started before custom configuration can
be applied. Instead of disabling all services from auto starting on installation
dpkg_deb_unautostart cookbook does, lets allow specific services
to be targeted.
Include the cookbook as a dependency in your metadata:
Then, within your recipe, disable the service with the resource:
dpkg_autostart 'mysql-server' do allow false end
That's it. When
dpkg attempts to start the service after install (generally
apt) it will be instructed not to. This allows the proper configuration
files to be generated, and the service to be started after everything is
You can also provide a list of services to disable via node attribute. Add the default recipe to the run list:
and set the services you want to restrict from auto starting:
node.default['dpkg_autostart']['disabled_services'] = ['mysql-server', 'apache2']
- deb_pkg_unautostart: http://ckbk.it/deb_pkg_unautostart
This project exists thanks to all the people who contribute.
Thank you to all our backers!
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
This cookbook has no specified dependencies.
dpkg_autostart Cookbook CHANGELOG
This file is used to list changes made in each version of the dpkg_autostart cookbook.
0.4.2 - 2020-11-27
- Fix regression introduced in 0.4.1, of undefined method
- resolved cookstyle error: libraries/provider.rb:13:7 refactor:
- resolved cookstyle error: libraries/provider.rb:17:7 refactor:
- Restore Chef Infra Client < 16 compatibility
- resolved cookstyle error: libraries/resource.rb:8:7 warning:
- Transferred ownership of this cookbook to Sous Chefs
- Updated the resource to define the resource name via the resource DSL
- Updated the resource to define the allowed actions and default action via the resource DSL
- Removed support for Chef 10
- Added source_url / issues_url to the metadata.rb
- Added supports 'debian' and 'ubuntu' the to metadata.rb
- Added chefignore file to limit files uploaded to the Chef Server
- Added testing with GitHub Actions
- Added Delivery local mode configuration for local testing
- Added various documentation files
- Added a Berksfile
NOTE: Release introduces minor breaking change due to updated interaction with resource collection.
- Fix script syntax in bin file (#7 thanks @hamann!)
- Allow multiple services and actions (#7 thanks @hamann!)
ResourceCollection#insertwhen adding bin resource
- NOTE: This may require updating resource locations or adding the default recipe to the beginning of the run list
- Be a noop except on debian family
- Add support for upstart services (thanks @bkw)
- Add support for Chef 10 (#3)
- Properly update
resource_collectionwhen unshifting (#4)
- Thanks @mpasternacki
- Fix version number
- Use "heavyweight" resource/provider
- Fix execution error on initial runs (#2)
- Add explicit
:createaction to template
- Initial commit