deric / puppet-mesos

Puppet module for managing Mesos nodes

Home Page:https://forge.puppetlabs.com/deric/mesos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

passing a different repo

tarungog opened this issue · comments

case $source {

There doesn't seem to be a way to easily pass a different repo. For example, our environment requires us to use a certain protocol to bypass its firewall. For example, here we would need "hkp://keyserver.ubuntu.com:80". Instead of manually changing the strings, it might be better if an object based solution existed

You're right, it isn't possible with the current version. What kind of interface would you prefer?

What about this?

class{'::mesos':
  repo => {
      location => "http://myrepo.example.com/${distro}",
      release  => $::lsbdistcodename,
      repos    => 'main',
      key      => {
          'id'     => 'xxx',
           'server' => 'keyserver.ubuntu.com',
      },
      include  => {
       'src' => false
      },
  }
}

The idea is that the hash would be passed to apt::source class. So, any parameter supported by that module should work.

Yeah that does seem to be more handy. Just to be clear, I could input a custom keyserver url with this new interface, right? I didn't make my intention clear with the initial post -- it's really the keyserver I'd like to change, not the repo location.

With the latest release (v0.8.2) you should be able to do:

class{'mesos':
  repo => {
    'key'     => {
      'id'     => '{mykey}',
      'server' => 'myserver.example.com',
    },
  }
}

The config is merged with mesosphere's repo config (see da4c779).