{"id":23439532,"url":"https://github.com/madwork/chef-apt-periodic","last_synced_at":"2025-04-09T19:57:35.004Z","repository":{"id":15033304,"uuid":"17759157","full_name":"madwork/chef-apt-periodic","owner":"madwork","description":"Chef cookbook for configuring Apt::Periodic and unattended-upgrades package on Ubuntu.","archived":false,"fork":false,"pushed_at":"2014-08-11T10:38:22.000Z","size":216,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T19:57:30.091Z","etag":null,"topics":["chef-cookbook","unattended-upgrades"],"latest_commit_sha":null,"homepage":"https://supermarket.getchef.com/cookbooks/apt-periodic","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"humiaozuzu/awesome-flask","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/madwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-14T20:22:56.000Z","updated_at":"2017-06-05T16:56:13.000Z","dependencies_parsed_at":"2022-09-07T04:13:38.239Z","dependency_job_id":null,"html_url":"https://github.com/madwork/chef-apt-periodic","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madwork%2Fchef-apt-periodic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madwork%2Fchef-apt-periodic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madwork%2Fchef-apt-periodic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madwork%2Fchef-apt-periodic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madwork","download_url":"https://codeload.github.com/madwork/chef-apt-periodic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103910,"owners_count":21048245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chef-cookbook","unattended-upgrades"],"created_at":"2024-12-23T15:29:33.794Z","updated_at":"2025-04-09T19:57:34.981Z","avatar_url":"https://github.com/madwork.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# APT::Periodic Cookbook\n\n[![Build Status](https://img.shields.io/travis/madwork/chef-apt-periodic.svg)](https://travis-ci.org/madwork/chef-apt-periodic)\n[![Cookbook Version](https://img.shields.io/cookbook/v/apt-periodic.svg)](https://supermarket.getchef.com/cookbooks/apt-periodic)\n\nChef cookbook for configuring **APT::Periodic** variables for daily cron job `/etc/cron.daily/apt` and [unattended-upgrades](http://packages.ubuntu.com/precise/unattended-upgrades) package on Ubuntu.\n\n- `/etc/apt/apt.conf.d/10periodic`\n- `/etc/apt/apt.conf.d/50unattended-upgrades`\n\n## Requirements\n\n#### supports\n\n- `ubuntu \u003e= 12.04`\n\n#### depends\n\n- `apt`\n\n## Installation\n\n### From the [Community Site](https://supermarket.getchef.com/cookbooks/apt-periodic)\n\nUse the knife command:\n\n```sh\n$ knife cookbook site install apt-periodic\n```\n\n### With [librarian-chef](https://github.com/applicationsonline/librarian-chef)\n\nEdit `Cheffile`\n\n    site \"https://supermarket.getchef.com/api/v1\"\n\n    cookbook 'apt-periodic', '~\u003e 0.2.0'\n\nResolves and installs all of the dependencies:\n\n```sh\n$ librarian-chef install\n```\n\n### With [berkshelf](http://berkshelf.com/)\n\nEdit `Berksfile`\n\n\tsource \"https://supermarket.getchef.com\"\n\n\tcookbook 'apt-periodic', '~\u003e 0.2.0'\n\nInstall the cookbooks you specified in the Berksfile and their dependencies:\n\n```sh\n$ berks install\n```\n\n## Attributes\n\n#### apt-periodic::default\n\nSee [attributes/default.rb](attributes/default.rb)\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eDescription\u003c/th\u003e\n    \u003cth\u003eType\u003c/th\u003e\n    \u003cth\u003eDefault\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['auto_apt_enable']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eEnable the update/upgrade script (0=disable)\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"1\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['update_interval']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDo \"apt-get update\" automatically every n-days (0=disable)\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"1\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['download_upgradeable_interval']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDo \"apt-get upgrade --download-only\" every n-days (0=disable)\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"0\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['debdelta']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eUse debdelta-upgrade to download updates if available (0=disable)\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"1\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['autoclean_interval']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDo \"apt-get autoclean\" every n-days (0=disable)\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"0\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['backup_level']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eBackup level (0=disable), 1 is invalid.\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"3\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['backup_archive_interval']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eBackup after n-days if archive contents changed (0=disable)\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"0\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['random_sleep']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSleep for a random interval of time\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"1800\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['verbose']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSet VERBOSE mode from apt-config\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"0\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['min_age']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSet minimum age of a package file. If a file is younger it will not be deleted (0=disable). Usefull to prevent races and to keep backups of the packages for emergency.\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"0\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['max_age']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSet maximum allowed age of a cache package file. If a cache package file is older it is deleted (0=disable)\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"2\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['max_size']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSet maximum size of the cache in MB (0=disable). If the cache is bigger, cached package files are deleted until the size requirement is met (the biggest packages will be deleted first).\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"0\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['unattended_upgrade_interval']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eRun the \"unattended-upgrade\" security upgrade script every n-days (0=disabled)\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"0\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['unattended_upgrades']['allowed_origins']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eAutomatically upgrade packages from these (origin:archive) pairs\u003c/td\u003e\n    \u003ctd\u003eArray\u003c/td\u003e\n    \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n   \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['unattended_upgrades']['package_blacklist']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eList of packages to not update\u003c/td\u003e\n    \u003ctd\u003eArray\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e[]\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['unattended_upgrades']['auto_fix_interrupted_dpkg']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eThis option allows you to control if on a unclean dpkg exit unattended-upgrades will automatically run dpkg --force-confold --configure -a\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"true\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['unattended_upgrades']['minimal_steps']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSplit the upgrade into the smallest possible chunks so that they can be interrupted with SIGUSR1. This makes the upgrade a bit slower but it has the benefit that shutdown while a upgrade is running is possible (with a small delay)\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"false\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['unattended_upgrades']['install_on_shutdown']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eInstall all unattended-upgrades when the machine is shuting down instead of doing it in the background while the machine is running. This will (obviously) make shutdown slower\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"false\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['unattended_upgrades']['mail']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSend email to this address for problems or packages upgrades. If empty or unset then no email is sent, make sure that you have a working mail setup on your system.\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['unattended_upgrades']['mail_only_on_error']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSet this value to \"true\" to get emails only on errors.\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"false\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['unattended_upgrades']['remove_unused_dependencies']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDo automatic removal of new unused dependencies after the upgrade (equivalent to apt-get autoremove)\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"true\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\u003ctt\u003e['apt_periodic']['unattended_upgrades']['automatic_reboot']\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eAutomatically reboot *WITHOUT CONFIRMATION* if a the file /var/run/reboot-required is found after the upgrade\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e\"false\"\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Usage\n\n#### apt-periodic::default\n\nJust include `apt-periodic` in your node's `run_list` and override default values if needed.\n\nExample with unattended upgrades every days and notification by mail:\n\n```json\n{\n  \"name\": \"app.crazy-automation.io\",\n  \"apt_periodic\": {\n    \"unattended_upgrade_interval\": \"1\",\n    \"unattended_upgrades\": {\n      \"mail\": \"admin@crazy-automation.io\"\n    }\n  },\n  \"run_list\": [\n    \"recipe[apt-periodic]\"\n  ]\n}\n```\n\n## Development\n\n#### Dependencies\n\n* [bundler](http://bundler.io/)\n* [vagrant](https://www.vagrantup.com/)\n* [kitchen-vagrant](https://github.com/test-kitchen/kitchen-vagrant)\n* [berkshelf](http://berkshelf.com/)\n\n#### Installation\n\nEnsure the gem dependencies are installed:\n\n```sh\n$ bundle install\n$ bundle exec berks install\n```\n\nRunning the tests:\n\n```sh\n$ bundle exec rspec\n$ bundle exec kitchen test\n```\n\n## Contributing\n\n1. Fork the repository on Github\n2. Create a named feature branch (like `add_component_x`)\n3. Write your change\n4. Write tests for your change (if applicable)\n5. Run the tests, ensuring they all pass\n6. Submit a Pull Request using Github\n\n## License\n\nWritten by [Vincent Durand](https://github.com/madwork).\n\nReleased under the terms of the MIT License. For further information, please see the file [LICENSE.txt](LICENSE.txt).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadwork%2Fchef-apt-periodic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadwork%2Fchef-apt-periodic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadwork%2Fchef-apt-periodic/lists"}