Comments (8)
The standard Ubuntu repositories do not contain spaces. Thus, when I tested after making the above change, I received the following output:
sudo unattended-upgrades --verbose --dry-run Initial blacklisted packages: Starting unattended upgrades script Allowed origins are: ['o=Ubuntu,a=trusty-security', 'o=Ubuntu,a=trusty-updates'] Packages that are auto removed: '' Option --dry-run given, *not* performing real actions (package operations omitted for the sake of brevity; but they worked as they should)
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.
from puppet-unattended_upgrades.
I think this is a dup of #14 ?
from puppet-unattended_upgrades.
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.
from puppet-unattended_upgrades.
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.
from puppet-unattended_upgrades.
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:
Unattended-Upgrade::Allowed-Origins { "${distro_id}:${distro_codename}-security"; "${distro_id}:${distro_codename}-updates"; };
Note that the origins are key/value pairs with a colon separating them. After changing the following in params.pp (beginning at line 42)
$origins = ['{$distro_id} {$distro_codename}-security', #lint:ignore:single_quote_string_with_variables '{$distro_id} {$distro_codename}-updates',] #lint:ignore:single_quote_string_with_variables
To:
$origins = ['{$distro_id}:{$distro_codename}-security', #lint:ignore:single_quote_string_with_variables '{$distro_id}:{$distro_codename}-updates',] #lint:ignore:single_quote_string_with_variables
...the 50unattended-upgrades file is correctly populated, and the unattended-upgrades package works correctly.
from puppet-unattended_upgrades.
@ephemeros you only need the :
if your repository name contains a space character as in:
Google\, Inc.:stable
from puppet-unattended_upgrades.
i just use *:*
:P
from puppet-unattended_upgrades.
Closing as a dupe of #14 for now. Will look at it further if it pops up again.
from puppet-unattended_upgrades.
Related Issues (20)
- Support puppetlabs-apt > 5 HOT 1
- incorrect Debian OS origin string HOT 2
- Add support for Debian 10 HOT 2
- Typo in Readme HOT 5
- new release HOT 6
- new release HOT 1
- minimize changes with default unattended-upgrades configuration HOT 2
- Add syslog support
- No version of 'puppet-unattended_upgrades' can satisfy all dependencies HOT 2
- 1
- random_sleep is ignored on machines using systemd HOT 13
- Debian 11 changes name of security suite
- [Ubuntu 20.04.3] Traceback when running unattended-upgrades --debug --dry-run HOT 3
- Please allow setting allow-releaseinfo-change Debian/Ubuntu
- Relax valadation for newer Periodic interval options
- T HOT 2
- Title HOT 1
- buildin function merge got deprecated in puppet 8 HOT 3
- Error while evaluating a Resource Statement, Duplicate declaration: Package[unattended-upgrades] is already declared HOT 1
- Example code generates puppet lint error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-unattended_upgrades.