Puppet Class: php::extra::yuicompressor::install

Inherits:
php::dependencies
Defined in:
manifests/extra/yuicompressor/install.pp

Overview



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'manifests/extra/yuicompressor/install.pp', line 1

class php::extra::yuicompressor::install inherits php::dependencies
{
	$ver = "2.4.8"
	$url = "https://github.com/yui/yuicompressor/releases/download/v${ver}/yuicompressor-${ver}.jar"
	wget::fetch {'php::extra::yuicompressor::install':
		source      => $url,
		destination => '/usr/bin/yuicompressor.jar',
		chmod       => 0755,
	}
	$resources = 'php::extra::yuicompressor::dependencies'
	if !defined(Package[$resources]) {
		package {$resources:
			ensure => present,
			name   => 'openjdk-6-jre',
		}
	}
	file {'php::extra::yuicompressor::alias-file':
		ensure  => present,
		owner   => root,
		group   => root,
		mode    => 0644,
		path    => '/etc/profile.d/yuicompressor.sh',
		content => "alias yuicompressor='java -jar /usr/bin/yuicompressor.jar'",
	}
}