sous-chefs / apt

Development repository for the apt cookbook
https://supermarket.chef.io/cookbooks/apt
Apache License 2.0
202 stars 266 forks source link

unattended-upgrades forced to check daily #241

Closed chobbs- closed 3 years ago

chobbs- commented 5 years ago

Cookbook version

7.1.1

Chef-client version

14

Platform Details

Ubuntu 16.04

Scenario:

My understanding of the values in 20auto-upgrade is that rather than the values being expected as 1/0 to enable/disable, the integer is used to specify the interval of these actions. Currently using this cookbook I am unable to configure the unattended-upgrades interval. The attribute in the cookbook to enable unattended-upgrades is true/false which allows the template file 20auto-upgrades to be configured with a 1 or 0 only. This forces either disabling auto updates OR run daily with no other choice.

Current Functionality:

Using current cookbook

default['apt']['unattended_upgrades']['enable'] = true
default['apt']['unattended_upgrades']['update_package_lists'] = true

Populates the template file 20auto-upgrades with:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";

What should happen:

The attributes should be configurable with an integer to denote "check every N days".

For instance, update package list and run unattended-upgrades every 7 days:

default['apt']['unattended_upgrades']['enable'] = 7
default['apt']['unattended_upgrades']['update_package_lists'] = 7

Populates the template file 20auto-upgrades with:

APT::Periodic::Update-Package-Lists "7";
APT::Periodic::Unattended-Upgrade "7";
welcomebot commented 5 years ago

Hey There It looks like this is the first issue you've filed against the chef-cookbooks project. I'm here to offer you a bit of extra help to make sure we can quickly get back to you. Make sure you've filled out all the fields in our issue template. Make sure you've provided us with the version of chef-client you're running, your operating system and the version of the cookbook. If you're not using the most up to date version of the cookbook then please make sure to update first. Lots of things change between versions even if you're issue isn't listed in the changelog. Finally please give us a detailed description of the issue you're having. The more we know about what you're trying to do, what actually happens, and how you can reproduce the problem, the better.

If you're looking for more immediate troubleshooting help make sure to check out #general on the Chef Community Slack. There's plenty of folks there willing to lend a helping hand. Thanks for the first issue. We hope we can get back to you soon with a solution.

github-actions[bot] commented 3 years ago

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

github-actions[bot] commented 3 years ago

Closing due to inactivity. If this is still an issue please reopen or open another issue. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.