-
Notifications
You must be signed in to change notification settings - Fork 74
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
Unattended-Upgrade::Allowed-Origins variables don't work #15
Comments
I think this is a dup of #14 ? |
Looks like it is; I didn't look at the pull requests before submitting this. My apologies. Notably, however, changing those variables to double quoted does not seem to have fixed the problem for me; in my unattended-upgrades.log I'm still seeing {Ubuntu} and {trusty} on an Ubuntu 14.04 machine. |
This is a dupe of #14 it doesn't have to do single vs double quotes (single quotes are correct in this instance as it is apt/unattended-upgrades that should be doing the variable substitution, not puppet). The braces are ending up in unattended upgrade's logs because apt is substituting just the "$distro_id" portion within the braces and not the full "${distro_id}" section as it would if the dollar sign and brace aren't transposed. |
Fixing the transposition of the $ and { did not resolve the issue. After further testing, however, I determined what the problem was. The /etc/apt/apt.conf.d/50unattended-upgrades file expects its origins section to be formatted as such:
Note that the origins are key/value pairs with a colon separating them. After changing the following in params.pp (beginning at line 42)
To:
...the 50unattended-upgrades file is correctly populated, and the unattended-upgrades package works correctly. |
@ephemeros you only need the
|
The standard Ubuntu repositories do not contain spaces. Thus, when I tested after making the above change, I received the following output:
You may not need a colon if you're writing the file yourself, with static origins instead of variables, but the file clearly states "Automatically upgrade packages from these (origin:archive) pairs which is what led me to try inserting those colons. |
i just use |
Closing as a dupe of #14 for now. Will look at it further if it pops up again. |
Noticed that the Allowed-Origins variables are passing through with {} characters around them, which breaks the unattended-upgrades package because those characters shouldn't be there in the actual config file. Upon examination of /manifests/params.pp, I saw that there were lint errors warning about single quoted strings containing variables which were ignored, see here for documentation:
http://puppet-lint.com/checks/single_quote_string_with_variables/
These variables in params.pp should be double quoted, which I am going to change and test on my own PE server. I will advise if that works.
The text was updated successfully, but these errors were encountered: