|
14 | 14 | class phpbrew ( |
15 | 15 | $php_install_dir = '/opt/phpbrew' |
16 | 16 | ) { |
17 | | - case $operatingsystem { |
| 17 | + case $::operatingsystem { |
18 | 18 | centos, redhat: { |
19 | 19 | fail('CentOS or RedHat are not supported yet') |
20 | 20 | } |
21 | 21 | debian, ubuntu: { |
22 | 22 | exec { '/usr/bin/apt-get -y update': } |
23 | 23 |
|
24 | | - $dependencies = [ 'autoconf', 'automake', 'curl', 'build-essential', 'libxslt1-dev', 're2c', 'libxml2-dev', 'php5-cli', 'libmcrypt-dev', 'php5-dev' ] |
| 24 | + $dependencies = [ |
| 25 | + 'autoconf', |
| 26 | + 'automake', |
| 27 | + 'curl', |
| 28 | + 'build-essential', |
| 29 | + 'libxslt1-dev', |
| 30 | + 're2c', |
| 31 | + 'libxml2-dev', |
| 32 | + 'php5-cli', |
| 33 | + 'libmcrypt-dev', |
| 34 | + 'php5-dev' |
| 35 | + ] |
25 | 36 |
|
26 | 37 | each($dependencies) |$dependency| { |
27 | 38 | if ! defined(Package[$dependency]) { |
|
56 | 67 |
|
57 | 68 | exec { 'init phpbrew': |
58 | 69 | command => '/usr/bin/sudo /usr/bin/phpbrew init', |
59 | | - creates => "/root/.phpbrew/bashrc", |
| 70 | + creates => '/root/.phpbrew/bashrc', |
60 | 71 | subscribe => File['/usr/bin/phpbrew'], |
61 | 72 | refreshonly => true, |
62 | 73 | } |
63 | 74 |
|
64 | 75 | file { $php_install_dir: |
65 | | - ensure => 'directory', |
| 76 | + ensure => 'directory', |
66 | 77 | require => Exec['init phpbrew'], |
67 | 78 | } |
68 | 79 |
|
69 | 80 | # Specify where versions of PHP will be installed. |
70 | | - file { "/root/.phpbrew/init": |
| 81 | + file { '/root/.phpbrew/init': |
71 | 82 | content => "export PHPBREW_ROOT=${php_install_dir}", |
72 | 83 | require => Exec['init phpbrew'] |
73 | 84 | } |
74 | 85 |
|
75 | 86 | # Load phpbrew configuration by default. |
76 | 87 | file_line { 'add phpbrew to bashrc': |
77 | | - path => '/root/.bashrc', |
78 | | - line => "source /root/.phpbrew/bashrc", |
| 88 | + path => '/root/.bashrc', |
| 89 | + line => 'source /root/.phpbrew/bashrc', |
79 | 90 | require => Exec['init phpbrew'], |
80 | 91 | } |
81 | 92 |
|
82 | 93 | exec { 'update basbrc': |
83 | | - command => "/bin/bash" |
| 94 | + command => '/bin/bash' |
84 | 95 | } |
85 | 96 |
|
86 | | - file { "/root/.phpbrew/install_extension.sh": |
| 97 | + file { '/root/.phpbrew/install_extension.sh': |
87 | 98 | ensure => present, |
88 | 99 | mode => 'a+x', |
89 | | - source => "puppet:///modules/phpbrew/install_extension.sh", |
| 100 | + source => 'puppet:///modules/phpbrew/install_extension.sh', |
90 | 101 | require => Exec['init phpbrew'] |
91 | 102 | } |
92 | 103 | } |
0 commit comments