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

Redesign Unattended-Upgrade::Origins-Pattern interface #17

Open
ypid opened this issue Apr 26, 2017 · 1 comment
Open

Redesign Unattended-Upgrade::Origins-Pattern interface #17

ypid opened this issue Apr 26, 2017 · 1 comment

Comments

@ypid
Copy link
Member

ypid commented Apr 26, 2017

Looking back at the design by @drybjed and myself of 50unattended-upgrades.j2 and unattended_upgrades__tpl_macros.j2 it seems we overdid it a little bit with the Jinja2 templating. I guess we tried to see how far Jinja2 can be used to cache a list using Ansible local facts and make it idemptent. I guess this is not very Debian like and I found a different way how this can be handled using apt.conf.d. It is simple. Just split the definition of Unattended-Upgrade::Origins-Pattern done by various variables/roles over multiple files the same as other roles handle it.

Example:

/etc/apt/apt.conf.d/50unattended-upgrades_debops_owncloud:

Unattended-Upgrade::Origins-Pattern {
        "site=download.owncloud.org";
};

APT will merge the definitions as can be checked using apt-config dump.

This is also a reminder to myself that KISS is important 😉

@drybjed
Copy link
Member

drybjed commented Apr 26, 2017

Good to know that APT can do stuff like this! It could probably make some things simplier.

The current debops.unattended_upgrades role seems to work fine, so I suppose we don't need to mess with it at this point. Custom configuration from other roles can be done directly either way.

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

No branches or pull requests

2 participants