Skip to content

Commit 1fcb241

Browse files
committed
Commit
1 parent 7557124 commit 1fcb241

File tree

2 files changed

+41
-12
lines changed

2 files changed

+41
-12
lines changed

manifests/init.pp

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@
2828
'openssl-devel',
2929
'bzip2-devel',
3030
'libicu-devel',
31-
'readline-devel'
31+
'readline-devel',
32+
33+
'httpd-devel',
34+
'libcurl-devel',
35+
'oniguruma-devel',
36+
'libsodium-devel'
3237
]
3338

3439
exec { 'Installing Development Tools package group':
@@ -98,8 +103,8 @@
98103
}
99104

100105
exec { 'init phpbrew':
101-
command => '/usr/bin/sudo /usr/bin/phpbrew init',
102-
creates => '~/.phpbrew/bashrc',
106+
command => '/usr/bin/sudo /usr/bin/phpbrew init --root=/opt/phpbrew',
107+
creates => '/opt/phpbrew/bashrc',
103108
subscribe => File['/usr/bin/phpbrew'],
104109
refreshonly => true,
105110
}
@@ -115,12 +120,12 @@
115120
}
116121

117122
# Specify where versions of PHP will be installed.
118-
file { '~/.phpbrew/init':
123+
file { '/opt/phpbrew/init':
119124
content => "export PHPBREW_ROOT=${php_install_dir}",
120125
require => Exec['init phpbrew']
121126
}->
122-
file_line { 'Append a line to ~/.phpbrew/init':
123-
path => '~/.phpbrew/init',
127+
file_line { 'Append a line to /opt/phpbrew/init':
128+
path => '/opt/phpbrew/init',
124129
line => 'export PHPBREW_HOME=${php_install_dir}',
125130
}
126131

@@ -132,18 +137,18 @@
132137
}
133138

134139
# Load phpbrew configuration by default.
135-
file_line { 'add phpbrew to bashrc':
136-
path => '~/.bashrc',
137-
line => 'source ~/.phpbrew/bashrc',
138-
require => Exec['init phpbrew'],
139-
}
140+
# file_line { 'add phpbrew to bashrc':
141+
# path => '~/.bashrc',
142+
# line => 'source ~/.phpbrew/bashrc',
143+
# require => Exec['init phpbrew'],
144+
# }
140145

141146

142147
exec { 'update basbrc':
143148
command => '/bin/bash'
144149
}
145150

146-
file { '~/.phpbrew/install_extension.sh':
151+
file { '/opt/phpbrew/install_extension.sh':
147152
ensure => present,
148153
mode => 'a+x',
149154
source => 'puppet:///modules/phpbrew/install_extension.sh',

manifests/pre_init.pp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
class phpbrew::pre_init
2+
{
3+
case $::operatingsystem {
4+
centos: {
5+
if $::operatingsystemmajrelease == '7' {
6+
7+
8+
package { 'libzip':
9+
provider => 'rpm',
10+
ensure => installed,
11+
source => "http://packages.psychotic.ninja/7/plus/x86_64/RPMS//libzip-0.11.2-6.el7.psychotic.x86_64.rpm"
12+
}
13+
14+
package { 'libzip-devel':
15+
provider => 'rpm',
16+
ensure => installed,
17+
source => "http://packages.psychotic.ninja/7/plus/x86_64/RPMS//libzip-devel-0.11.2-6.el7.psychotic.x86_64.rpm"
18+
}
19+
} else {
20+
fail("CentOS support only tested on major version 7, you are running version '${::operatingsystemmajrelease}'")
21+
}
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)