Defined Type: php::peclcouchbase

Defined in:
manifests/peclcouchbase.pp

Overview

Parameters:

  • enablefile (Any) (defaults to: undef)


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
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
# File 'manifests/peclcouchbase.pp', line 1

define php::peclcouchbase   (
        $enablefile = undef,
      ) {

  Exec {
    path => '/usr/sbin:/usr/bin:/sbin:/bin',
  }

  #TODO: integrar amb pecl generic

  case $::osfamily
  {
    'Debian':
    {
      case $::operatingsystem
      {
        'Ubuntu':
        {
          case $::operatingsystemrelease
          {
            /^14.*$/:
            {
              $couchbase_dependencies= [ 'libcouchbase2-bin', 'libcouchbase2-core', 'libcouchbase2-libev', 'libcouchbase2-libevent', 'libcouchbase-dev' ]

              apt::source { 'couchbase':
                location => 'http://packages.couchbase.com/ubuntu',
                release  => $::lsbdistcodename,
                repos    => "${::lsbdistcodename}/main",
              }

              apt::key { 'couchbase':
                key        => '136CD3BA884E3CB0E44E7A5BE905C770CD406E62',
                key_source => 'http://packages.couchbase.com/ubuntu/couchbase.key',
              }

            }
            default: { fail("Unsupported Ubuntu version! - ${::operatingsystemrelease}")  }
          }
        }
        'Debian': { fail('Unsupported')  }
        default: { fail('Unsupported Debian flavour!')  }
      }
    }
    default: { fail('Unsupported OS!')  }
  }

  php::pecl { 'couchbase':
    dependencies => [ $couchbase_dependencies ],
    enablefile   => $enablefile,
    require      => Exec['apt_update'],
  }
}