Commits

Peter Eisentraut committed 1fac4c9

Manage puppet modules as submodules

Apparently, the stuff on Puppet Forge is not maintained very well, so
get the stuff straight from GitHub, which is what most module authors
appear to recommend anyway.

Comments (0)

Files changed (4)

+[submodule "modules/apache"]
+	path = modules/apache
+	url = git://github.com/puppetlabs/puppetlabs-apache.git
+[submodule "modules/apt"]
+	path = modules/apt
+	url = git://github.com/puppetlabs/puppetlabs-apt.git
+[submodule "modules/jenkins"]
+	path = modules/jenkins
+	url = git://github.com/rtyler/puppet-jenkins.git
+[submodule "modules/stdlib"]
+	path = modules/stdlib
+	url = git://github.com/puppetlabs/puppetlabs-stdlib.git
   end
 
   config.vm.provision :puppet do |puppet|
-    puppet.manifest_file = "puppet_modules.pp"
-  end
-
-  config.vm.provision :puppet do |puppet|
     puppet.manifest_file = "pgci.pp"
+    puppet.module_path = "modules"
   end
 
   config.vm.share_folder "pgci", "/srv/pgci", "."

manifests/pgci.pp

 }
 
 class { 'jenkins': }
-class { 'jenkins::git': }
 package { 'git': }
 
 # needed to run git inside jenkins
   before => Class['jenkins::service'],
 }
 
-install-jenkins-plugin { 'configurationslicing':
-  name => 'configurationslicing',
-}
-install-jenkins-plugin { 'htmlpublisher':
-  name => 'htmlpublisher',
-}
-install-jenkins-plugin { 'timestamper':
-  name => 'timestamper',
-}
-install-jenkins-plugin { 'thinBackup':
-  name => 'thinBackup',
-}
-install-jenkins-plugin { 'ws-cleanup':
-  name => 'ws-cleanup',
-}
+jenkins::plugin { 'configurationslicing': }
+jenkins::plugin { 'git': }
+jenkins::plugin { 'htmlpublisher': }
+jenkins::plugin { 'timestamper': }
+jenkins::plugin { 'thinBackup': }
+jenkins::plugin { 'ws-cleanup': }
 
 class { 'apache': }
 class { 'apache::mod::proxy': }

manifests/puppet_modules.pp

-define puppetmodule ($user = 'puppetlabs') {
-  exec { "$name":
-    path => ['/usr/bin', '/bin'],
-    command => "puppet module install $user/$name",
-    creates => "/etc/puppet/modules/$name/",
-  }
-}
-
-puppetmodule { 'apache': }
-puppetmodule { 'apt': }
-puppetmodule { 'jenkins': user => 'rafaelfc' }