deric / puppet-mesos

Puppet module for managing Mesos nodes
https://forge.puppetlabs.com/deric/mesos
Apache License 2.0
69 stars 61 forks source link

passing a different repo #77

Closed tarungog closed 8 years ago

tarungog commented 8 years ago

https://github.com/deric/puppet-mesos/blob/ee5d0f0f6e22fcf10848f7fc563437d5e55821ab/manifests/repo.pp#L17

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

deric commented 8 years ago

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.

tarungog commented 8 years ago

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.

deric commented 8 years ago

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).