https://www.puppet.com/community logo
Join Slack
Powered by
# puppet
  • p

    Pavlos Parissis

    09/06/2022, 9:04 PM
    I guess I need to contain https://github.com/puppetlabs/puppetlabs-apt/blob/main/manifests/update.pp
  • v

    vchepkov

    09/06/2022, 9:04 PM
    yep
  • v

    vchepkov

    09/06/2022, 9:05 PM
    but you can't, because class is private 🙂
  • p

    Pavlos Parissis

    09/06/2022, 9:05 PM
    apt::source sends the notify here https://github.com/puppetlabs/puppetlabs-apt/blob/main/manifests/source.pp#L162
  • p

    Pavlos Parissis

    09/06/2022, 9:05 PM
    apt::source sends the notify here https://github.com/puppetlabs/puppetlabs-apt/blob/main/manifests/source.pp#L162
  • p

    Pavlos Parissis

    09/06/2022, 9:05 PM
    yeap it is private and I shouldn't even declare it from my mods
  • p

    Pavlos Parissis

    09/06/2022, 9:06 PM
    thus I came up with the require part but it looked hackish and wanted to check for better alternatives
  • p

    Pavlos Parissis

    09/06/2022, 9:06 PM
    but I don't see. do you?
  • v

    vchepkov

    09/06/2022, 9:08 PM
    not a debian person, sorry, but where that apt::update class is included?
  • p

    Pavlos Parissis

    09/06/2022, 9:08 PM
    but I still don't know the root cause of the problem, why the exec is not triggered after apt::source installs the definition
  • v

    vchepkov

    09/06/2022, 9:09 PM
    puppetlabs says put dependency on the class
  • v

    vchepkov

    09/06/2022, 9:09 PM
    https://github.com/puppetlabs/puppetlabs-apt/blob/8927af46c0bb430be677bc919323c133204a253d/README.md#adding-new-sources-or-ppas
  • v

    vchepkov

    09/06/2022, 9:10 PM
    imho, that doesn't look right, they should have contained it
  • p

    Pavlos Parissis

    09/06/2022, 9:10 PM
    ok then I will simply change the require to
    Class['apt::update']
  • p

    Pavlos Parissis

    09/06/2022, 9:10 PM
    ok then I will simply change the require to
    Class['apt::update']
  • y

    Yorokobi

    09/06/2022, 9:11 PM
    You usually want to put something like
    include apt
    and
    Class['apt::update'] -> Class['other::things']
    early on
  • s

    Slackbot

    09/06/2022, 9:11 PM
    This message was deleted.
    p
    v
    • 3
    • 4
  • v

    vchepkov

    09/06/2022, 9:11 PM
    https://github.com/puppetlabs/puppetlabs-apt/blob/main/manifests/init.pp#L204
  • v

    vchepkov

    09/06/2022, 9:11 PM
    that should have been contain instead
  • v

    vchepkov

    09/06/2022, 9:12 PM
    Open a bug
  • p

    Pavlos Parissis

    09/06/2022, 9:13 PM
    checking for existing issues
  • p

    Pavlos Parissis

    09/06/2022, 9:14 PM
    I found this one https://github.com/puppetlabs/puppetlabs-apt/issues/210
  • p

    Pavlos Parissis

    09/06/2022, 9:14 PM
    I found this one https://github.com/puppetlabs/puppetlabs-apt/issues/210
  • p

    Pavlos Parissis

    09/06/2022, 9:16 PM
    https://github.com/puppetlabs/puppetlabs-apt/issues/147
  • p

    Pavlos Parissis

    09/06/2022, 9:16 PM
    https://github.com/puppetlabs/puppetlabs-apt/issues/147
  • v

    vchepkov

    09/06/2022, 9:17 PM
    in yum world, this works without having to bother with any other dependencies or collectors
    Copy code
    class profile::yum {
      contain yum
    
    class profile::server {
      require profile::yum
  • v

    vchepkov

    09/06/2022, 9:17 PM
    so, apt module isn't designed right,imho
  • p

    Pavlos Parissis

    09/06/2022, 9:18 PM
    Copy code
    ➜ cat site-modules/filebeat/manifests/install.pp
    class filebeat::install {
      package { 'filebeat':
        ensure  => $filebeat::package_ensure,
        require => Class['apt::update'],
      }
    }
    solves the problem as well
  • p

    Pavlos Parissis

    09/06/2022, 9:19 PM
    well at least I am using a documented hack
  • v

    vchepkov

    09/06/2022, 9:19 PM
    Suppose I add require => Yumrepo , if I don't manage it with yum hiera
1...153154155...428Latest