Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

Commit

Permalink
Auto download Maven bin.tar.gz
Browse files Browse the repository at this point in the history
Add wget puppet submodule

Sync the puppet/modules dir so we can download maven bin to it
  • Loading branch information
rob-murray committed Apr 10, 2015
1 parent e145e90 commit 1e4ecf2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -19,3 +19,6 @@
[submodule "puppet/modules/maven"]
path = puppet/modules/maven
url = https://github.com/7terminals/puppet-maven
[submodule "puppet/modules/wget"]
path = puppet/modules/wget
url = https://github.com/maestrodev/puppet-wget.git
3 changes: 1 addition & 2 deletions Vagrantfile
@@ -1,10 +1,8 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :


#
# Vagrant configuration for vagrant-jdev-box
# @link
# https://github.com/rob-murray/vagrant-javadev-box
#
Vagrant.configure("2") do |config|
Expand All @@ -23,6 +21,7 @@ Vagrant.configure("2") do |config|

# Share the working dir - host, guest
config.vm.synced_folder "project", "/vagrant"
config.vm.synced_folder "puppet/modules", "/puppet"

config.vm.provision "shell", inline: "apt-get update --fix-missing"

Expand Down
20 changes: 17 additions & 3 deletions puppet/manifests/base.pp
Expand Up @@ -5,7 +5,7 @@
# vagrant-javadev-box
# https://github.com/rob-murray/vagrant-javadev-box
#

include wget

# Install latest jdk
class { 'java':
Expand Down Expand Up @@ -36,10 +36,24 @@
# If necessary, config here to build application specific database

# Install Maven to the vagrant users home dir and shell
file { [ "/puppet/maven/files" ]:
ensure => "directory",
}

wget::fetch { "download-maven-bin":
source => "http://mirrors.ukfast.co.uk/sites/ftp.apache.org/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz",
destination => "/puppet/maven/files/apache-maven-3.2.5-bin.tar.gz",
verbose => true,
require => File[ "/puppet/maven/files" ]
}

include maven

maven::setup { "maven":
ensure => 'present',
source => 'apache-maven-3.2.3-bin.tar.gz',
source => 'apache-maven-3.2.5-bin.tar.gz',
deploymentdir => '/home/vagrant/apache-maven',
user => 'vagrant',
pathfile => '/home/vagrant/.bashrc'
pathfile => '/home/vagrant/.bashrc',
require => Wget::Fetch['download-maven-bin']
}
1 change: 1 addition & 0 deletions puppet/modules/wget
Submodule wget added at f17c06

0 comments on commit 1e4ecf2

Please sign in to comment.