Skip to content
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

Set unattended-upgrades on Ubuntu hosts #276

Closed
wants to merge 2 commits into from

Conversation

@edunham
Copy link
Contributor

edunham commented Mar 24, 2016

Not sure if this is the best way, but http://blog.viraptor.info/post/75262988169/ubuntu-unattended-upgrades-the-salt-way suggests it.

Fixes #275

r? @aneeshusa


This change is Reviewable

Not sure if this is the best way, but
http://blog.viraptor.info/post/75262988169/ubuntu-unattended-upgrades-the-salt-way
suggests it.

Fixes #275
@aneeshusa
Copy link
Member

aneeshusa commented Mar 25, 2016

I don't think we actually need the cmd.wait here, the debconf.set should handle everything. We should check in Vagrant. Also FYI, cmd.wait has recently been deprecated, so we shouldn't use it in any new commits (I removed our last remaining uses during the Android refactor).

@aneeshusa
Copy link
Member

aneeshusa commented Mar 25, 2016

We'll also need a pkg.installed state to install the unattended-upgrades package, which should require the debconf.set state (we can nest them under the same ID).

@aneeshusa
Copy link
Member

aneeshusa commented Mar 25, 2016

Actually, I think we'll need to replace the cmd.wait state with a file.managed state that does the same thing by putting the following into /etc/apt/apt.conf.d/20auto-upgrades:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
@aneeshusa
Copy link
Member

aneeshusa commented Mar 25, 2016

Do we want the machines to auto-reboot if necessary? I'm assuming not, but if so we'll need to do a little more to activate that feature.

@edunham
Copy link
Contributor Author

edunham commented Mar 25, 2016

@aneeshusa I don't think that auto-rebooting would be a good idea right now. Latest commit implements the other 3 changes you suggested.

@edunham
Copy link
Contributor Author

edunham commented Mar 28, 2016

@aneeshusa
Copy link
Member

aneeshusa commented Mar 28, 2016

Didn't see you had updated this, sorry.

This is going to require some in Vagrant testing - I suspect the unattended-upgrades package has an associated service we'll need to start (due to #229).

@@ -6,10 +6,24 @@ python2:
- python
{% if grains['os'] == 'Ubuntu' %}
python2-dev:
ubuntu-packages:

This comment has been minimized.

Copy link
@aneeshusa

aneeshusa Mar 28, 2016

Member

I'd prefer to keep this state ID as just python2-dev, and add a new pkg.installed state under the unattended-upgrades ID to install the respective package. That lets us keep all of the unattended upgrades states together.

This comment has been minimized.

Copy link
@aneeshusa

aneeshusa Mar 28, 2016

Member

Also, the new pkg.installed state should require the debconf state for ordering purposes.

@aneeshusa aneeshusa self-assigned this Aug 9, 2016
@bors-servo
Copy link
Contributor

bors-servo commented Jan 17, 2017

The latest upstream changes (presumably #577) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.