kindredgroup / puppet-vagrant

Puppet module to manage vagrant and its plugins installation
Apache License 2.0
4 stars 6 forks source link

Set provider to "dpkg" on debian systems #1

Closed ghost closed 9 years ago

ghost commented 9 years ago

Shouldn't $::vagrant::package::provider be set to 'dpkg' in order to install a local package on debian/ubuntu/linuxmint?

i11 commented 9 years ago

I've tried to keep vagrant::package type rather flexible, but that makes it low level and explicit. So yes, dpkg is required to install vagrant on debian machines from the remote source and vagrant class handles that. Direct vagrant::package usage assumes more advanced use-cases where provider has to be set as well.

ghost commented 9 years ago

OK, I wasn't aware that specifying "source" attribute to Package type on Debian would cause it to automatically switch to provider "dpkg". I've now verified this with:

# dpkg --purge vagrant
(Reading database ... 68176 files and directories currently installed.)
Removing vagrant (1:1.7.2) ...
# puppet apply --verbose -e 'package {"vagrant": source => "vagrant_1.7.2_amd64.deb", ensure => "installed" }'
Notice: Compiled catalog for b28-vbox.vagrant in environment production in 0.08 seconds
Info: Applying configuration version '1427236702'
Notice: /Stage[main]/Main/Package[vagrant]/ensure: ensure changed 'purged' to 'present'
Notice: Finished catalog run in 3.18 seconds
# dpkg -l vagrant
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                   Version                  Architecture             Description
+++-======================================-========================-========================-==================================================================================
ii  vagrant                                1:1.7.2                  amd64                    no description given

So you are right - there is no need to be more explicit about it.

i11 commented 9 years ago

Great! Thanks for verifying it!