Puppet Class: tungsten::prereq::repo

Defined in:
manifests/prereq/repo.pp

Overview

Parameters:

  • replicatorRepo (Any) (defaults to: false)


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'manifests/prereq/repo.pp', line 17

class tungsten::prereq::repo(
	$replicatorRepo							= false,
) {
  if ($operatingsystem =~ /(?i:centos|redhat|oel|OracleLinux|amazon)/) {
		if $replicatorRepo == "nightly" {
  		$url = "http://yum.tungsten-replicator.org/replicator-release-nightly-0.0-1.noarch.rpm"
  	} elsif $replicatorRepo == "stable" {
  		$url = "http://yum.tungsten-replicator.org/replicator-release-stable-0.0-1.noarch.rpm"
  	} elsif $replicatorRepo == true {
  		$url = "http://yum.tungsten-replicator.org/replicator-release-stable-0.0-1.noarch.rpm"
  	} else {
  		$url = false
  	}

  	if $url != false {
  		package { "replicator-release-$replicatorRepo":
  			provider => "rpm",
  			ensure => present,
  			source => $url,
  		}
  	}
	} elsif ($operatingsystem =~ /(?i:debian|ubuntu)/) {
		if $replicatorRepo == "nightly" {
  		$url = "http://apt-nightly.tungsten-replicator.org/"
  		$release = "nightly"
  	} elsif $replicatorRepo == "stable" {
  		$url = "http://apt.tungsten-replicator.org/"
  		$release = "stable"
  	} elsif $replicatorRepo == true {
    		$url = "http://apt.tungsten-replicator.org/"
    		$release = "stable"
  	} else {
  		$url = false
  	}

  	if $url != false {
  		apt::source { 'continuent':
    		ensure => present,
    		include_src => false,
    		location => $url,
    		release => $release,
    		repos => 'main',
    		key => "7206C924",
    	}
  	}
	} else {
	  if $replicatorRepo != false {
		  fail("The ${module_name} module is not supported on an ${::operatingsystem} based system.")
		}
	}
}