GithubHelp home page GithubHelp logo

Comments (8)

ephemeros avatar ephemeros commented on July 18, 2024 1

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.

nibalizer avatar nibalizer commented on July 18, 2024

I think this is a dup of #14 ?

from puppet-unattended_upgrades.

ephemeros avatar ephemeros commented on July 18, 2024

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.

cpick avatar cpick commented on July 18, 2024

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.

ephemeros avatar ephemeros commented on July 18, 2024

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.

GhostLyrics avatar GhostLyrics commented on July 18, 2024

@ephemeros you only need the : if your repository name contains a space character as in:

Google\, Inc.:stable

from puppet-unattended_upgrades.

igalic avatar igalic commented on July 18, 2024

i just use *:* :P

from puppet-unattended_upgrades.

daenney avatar daenney commented on July 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.