|
99 | 99 |
|
100 | 100 | exec { 'init phpbrew': |
101 | 101 | command => '/usr/bin/sudo /usr/bin/phpbrew init', |
102 | | - creates => '/root/.phpbrew/bashrc', |
| 102 | + creates => '~/.phpbrew/bashrc', |
103 | 103 | subscribe => File['/usr/bin/phpbrew'], |
104 | 104 | refreshonly => true, |
105 | 105 | } |
|
115 | 115 | } |
116 | 116 |
|
117 | 117 | # Specify where versions of PHP will be installed. |
118 | | - file { '/root/.phpbrew/init': |
| 118 | + file { '~/.phpbrew/init': |
119 | 119 | content => "export PHPBREW_ROOT=${php_install_dir}", |
120 | 120 | require => Exec['init phpbrew'] |
| 121 | + }-> |
| 122 | + file_line { 'Append a line to ~/.phpbrew/init': |
| 123 | + path => '~/.phpbrew/init', |
| 124 | + line => 'export PHPBREW_HOME=${php_install_dir}', |
121 | 125 | } |
122 | 126 |
|
| 127 | + file { "/etc/profile.d/phpbrew.sh": |
| 128 | + ensure => present, |
| 129 | + content => template('phpbrew/phpbrew.sh.erb'), |
| 130 | + mode => 'a+x', |
| 131 | + require => Exec['init phpbrew'] |
| 132 | + } |
| 133 | + |
123 | 134 | # Load phpbrew configuration by default. |
124 | 135 | file_line { 'add phpbrew to bashrc': |
125 | | - path => '/root/.bashrc', |
126 | | - line => 'source /root/.phpbrew/bashrc', |
| 136 | + path => '~/.bashrc', |
| 137 | + line => 'source ~/.phpbrew/bashrc', |
127 | 138 | require => Exec['init phpbrew'], |
128 | 139 | } |
129 | 140 |
|
| 141 | + |
130 | 142 | exec { 'update basbrc': |
131 | 143 | command => '/bin/bash' |
132 | 144 | } |
133 | 145 |
|
134 | | - file { '/root/.phpbrew/install_extension.sh': |
| 146 | + file { '~/.phpbrew/install_extension.sh': |
135 | 147 | ensure => present, |
136 | 148 | mode => 'a+x', |
137 | 149 | source => 'puppet:///modules/phpbrew/install_extension.sh', |
|
0 commit comments