Skip to content

Commit 69017c7

Browse files
committed
Remove loglevel parameter
1 parent f5911e7 commit 69017c7

File tree

8 files changed

+59
-109
lines changed

8 files changed

+59
-109
lines changed

Modulefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ dependency 'puppetlabs/apt','>=1.0.0'
1414
dependency 'example42/php','>=2.0.17'
1515
dependency 'example42/puppi','>=1.0.0'
1616

17-
version '1.0.61'
17+
version '1.0.62'

README.markdown

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
compat_sys_deps=>false,
1616
zephir_build=>false,
1717
ini_file=>'phalcon.ini',
18-
debug=>false,
19-
loglevel=>'warning'
18+
debug=>false
2019
}
2120

2221
### Gittip: ###
@@ -35,7 +34,6 @@
3534
zephir_build
3635
ini_file
3736
debug
38-
loglevel
3937

4038
### Prerequisites: ###
4139

manifests/deps/devtools.pp

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,48 @@
33
# Parameters:
44
# [*version*] - desired devtools version - See https://github.com/phalcon/phalcon-devtools/branches for valid branch names
55
class phalconphp::deps::devtools (
6-
$version = '1.3.x',
7-
$debug = false,
8-
$loglevel = 'warning') {
6+
$version = '1.3.x',
7+
$debug = false) {
98
exec { 'git-clone-devtools':
109
command => "sudo git clone https://github.com/phalcon/phalcon-devtools.git -b ${version}",
1110
cwd => "/usr/share/php",
1211
unless => "test -d ./phalcon-devtools",
1312
require => [
1413
Package['php'],
1514
Class['phalconphp::deps::sys']],
16-
logoutput => $debug,
17-
loglevel => $loglevel
15+
logoutput => $debug
1816
}
1917

2018
exec { 'git-pull-devtools':
2119
command => "sudo git pull",
2220
cwd => "/usr/share/php/phalcon-devtools",
2321
onlyif => "sudo test -d ./phalcon-devtools",
2422
require => [Exec['git-clone-devtools']],
25-
logoutput => $debug,
26-
loglevel => $loglevel
23+
logoutput => $debug
2724
}
2825

2926
file { '/usr/bin/phalcon':
30-
ensure => link,
31-
path => '/usr/bin/phalcon',
32-
target => "/usr/share/php/phalcon-devtools/phalcon.php",
33-
require => [
27+
ensure => link,
28+
path => '/usr/bin/phalcon',
29+
target => "/usr/share/php/phalcon-devtools/phalcon.php",
30+
require => [
3431
Class['phalconphp::framework'],
35-
Exec['git-pull-devtools']],
36-
loglevel => $loglevel
32+
Exec['git-pull-devtools']]
3733
}
3834

3935
file { '/usr/share/php/phalcon-devtools':
40-
ensure => directory,
41-
recurse => true,
42-
owner => 'www-data',
43-
group => 'www-data',
44-
require => [Exec['git-pull-devtools']],
45-
loglevel => $loglevel
36+
ensure => directory,
37+
recurse => true,
38+
owner => 'www-data',
39+
group => 'www-data',
40+
require => [Exec['git-pull-devtools']]
4641
}
4742

4843
exec { 'chmod+x-devtools':
4944
command => 'chmod ugo+x /usr/bin/phalcon',
5045
require => [
5146
File['/usr/share/php/phalcon-devtools'],
5247
File['/usr/bin/phalcon']],
53-
logoutput => $debug,
54-
loglevel => $loglevel
48+
logoutput => $debug
5549
}
5650
}

manifests/deps/jsonc.pp

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,53 @@
22
# Installs json-c (https://github.com/json-c/json-c)
33

44
class phalconphp::deps::jsonc (
5-
$debug = false,
6-
$loglevel = 'warning') {
5+
$debug = false) {
76
include phalconphp::deps::sys
87

98
exec { 'git-clone-json-c':
109
command => 'git clone https://github.com/json-c/json-c.git',
1110
cwd => '/tmp',
1211
unless => 'test -d /tmp/json-c',
1312
require => [Class['phalconphp::deps::sys']],
14-
logoutput => $debug,
15-
loglevel => $loglevel
13+
logoutput => $debug
1614
} ->
1715
exec { 'git-pull-json-c':
1816
command => 'git pull',
1917
cwd => '/tmp/json-c',
2018
onlyif => 'test -d /tmp/json-c',
2119
require => [Exec['git-clone-json-c']],
22-
logoutput => $debug,
23-
loglevel => $loglevel
20+
logoutput => $debug
2421
} ->
2522
exec { 'autogen-json-c':
2623
command => 'sh ./autogen.sh',
2724
cwd => '/tmp/json-c',
2825
require => [Exec['git-pull-json-c']],
29-
logoutput => $debug,
30-
loglevel => $loglevel
26+
logoutput => $debug
3127
} ->
3228
exec { 'configure-json-c':
3329
command => '/tmp/json-c/configure',
3430
cwd => '/tmp/json-c',
3531
onlyif => 'test -f /tmp/json-c/configure',
3632
require => [Exec['autogen-json-c']],
37-
logoutput => $debug,
38-
loglevel => $loglevel
33+
logoutput => $debug
3934
} ->
4035
exec { 'make-json-c':
4136
command => "make -j${::processorcount}",
4237
cwd => '/tmp/json-c',
4338
require => [Exec['configure-json-c']],
44-
logoutput => $debug,
45-
loglevel => $loglevel
39+
logoutput => $debug
4640
} ->
4741
exec { 'install-json-c':
4842
command => "sudo make -j${::processorcount} install",
4943
cwd => '/tmp/json-c',
5044
require => [Exec['make-json-c']],
51-
logoutput => $debug,
52-
loglevel => $loglevel
45+
logoutput => $debug
5346
} ->
5447
exec { 'remove-json-c-source':
5548
cwd => '/tmp',
5649
command => 'rm ./json-c -R -f',
5750
onlyif => 'test -d /tmp/json-c',
5851
require => [Exec['install-json-c']],
59-
logoutput => $debug,
60-
loglevel => $loglevel
52+
logoutput => $debug
6153
}
6254
}

manifests/deps/sys.pp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Class: phalconphp::deps::sys
22
# Installs gcc, make, automake, autoconf, re2c, pcre, pcre-devel, libcurl, libcurl-devel, wget
33
class phalconphp::deps::sys (
4-
$each_compat = false,
5-
$loglevel = 'warning') {
4+
$each_compat = false) {
65
case $::osfamily {
76
'RedHat' : { # Define the package names for rhel
87
case $::operatingsystem {
@@ -56,17 +55,11 @@
5655
}
5756

5857
if $each_compat == true {
59-
package { $phalcon_deps:
60-
ensure => present,
61-
loglevel => $loglevel
62-
}
58+
package { $phalcon_deps: ensure => present }
6359
} else {
6460
each($phalcon_deps) |$phalcon_dep| {
6561
if defined(Package[$phalcon_dep]) == false {
66-
package { $phalcon_dep:
67-
ensure => present,
68-
loglevel => $loglevel
69-
}
62+
package { $phalcon_dep: ensure => present }
7063
}
7164
}
7265
}

manifests/deps/zephir.pp

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,31 @@
11
# Class: phalconphp::deps::zephir
22
# Installs Zephir (http://zephir-lang.com/)
33
class phalconphp::deps::zephir (
4-
$debug = false,
5-
$loglevel = 'warning') {
6-
class { 'phalconphp::deps::jsonc':
7-
debug => $debug,
8-
loglevel => $loglevel
9-
}
4+
$debug = false) {
5+
class { 'phalconphp::deps::jsonc': debug => $debug }
106

117
exec { 'git-clone-zephir':
128
command => 'git clone https://github.com/phalcon/zephir.git',
139
cwd => '/tmp',
1410
unless => 'test -d /tmp/zephir',
1511
require => [Class['phalconphp::deps::sys']],
16-
logoutput => $debug,
17-
loglevel => $loglevel
12+
logoutput => $debug
1813
} ->
1914
exec { 'git-pull-zephir':
2015
command => 'git pull',
2116
cwd => '/tmp/zephir',
2217
onlyif => 'test -d /tmp/zephir',
23-
logoutput => $debug,
24-
loglevel => $loglevel
18+
logoutput => $debug
2519
} ->
2620
exec { 'install-zephir':
2721
command => './install -c',
2822
cwd => '/tmp/zephir',
2923
require => [Class['phalconphp::deps::jsonc']],
30-
logoutput => $debug,
31-
loglevel => $loglevel
24+
logoutput => $debug
3225
} ->
3326
exec { 'check-zephir':
3427
command => 'zephir version',
3528
logoutput => $debug,
36-
require => [Exec['install-zephir']],
37-
loglevel => $loglevel
29+
require => [Exec['install-zephir']]
3830
}
3931
}

manifests/framework.pp

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,25 @@
44
$version,
55
$zephir_build = false,
66
$ini_file = "phalcon.ini",
7-
$debug = false,
8-
$loglevel = 'warning') {
7+
$debug = false) {
98
exec { 'git-clone-phalcon':
109
command => "git clone -b ${version} https://github.com/phalcon/cphalcon.git",
1110
cwd => '/tmp',
1211
require => [Class['phalconphp::deps::sys']],
1312
unless => 'test -d /tmp/cphalcon',
14-
logoutput => $debug,
15-
loglevel => $loglevel
13+
logoutput => $debug
1614
} ->
1715
exec { 'git-pull-phalcon':
1816
command => 'git pull',
1917
cwd => '/tmp/cphalcon',
2018
onlyif => 'test -d /tmp/cphalcon',
2119
require => [Exec['git-clone-phalcon']],
22-
logoutput => $debug,
23-
loglevel => $loglevel
20+
logoutput => $debug
2421
}
2522

2623
file { "${php::config_dir}/${ini_file}":
27-
ensure => file,
28-
require => [Class['php']],
29-
loglevel => $loglevel
24+
ensure => file,
25+
require => [Class['php']]
3026
}
3127

3228
if $version == '2.0.0' or $version == 'dev' {
@@ -38,44 +34,39 @@
3834
Class['phalconphp::deps::zephir'],
3935
Exec['git-pull-phalcon']],
4036
onlyif => 'test -f /tmp/cphalcon/config.json',
41-
logoutput => $debug,
42-
loglevel => $loglevel
37+
logoutput => $debug
4338
}
4439

4540
exec { 'install-phalcon-2.0':
4641
command => 'zephir build',
4742
cwd => '/tmp/cphalcon',
4843
require => [Exec['generate-phalcon-2.0']],
49-
logoutput => $debug,
50-
loglevel => $loglevel
44+
logoutput => $debug
5145
}
5246
} else {
5347
exec { 'install-phalcon-2.0':
5448
command => "/tmp/cphalcon/ext/install-test",
5549
cwd => '/tmp/cphalcon/ext',
5650
require => [Exec['git-pull-phalcon']],
5751
onlyif => 'test -f /tmp/cphalcon/ext/install-test',
58-
logoutput => $debug,
59-
loglevel => $loglevel
52+
logoutput => $debug
6053
}
6154
}
6255

6356
exec { 'remove-phalcon-src-2.0':
6457
cwd => '/tmp',
6558
command => 'rm ./cphalcon -R -f',
6659
require => [Exec['install-phalcon-2.0']],
67-
logoutput => $debug,
68-
loglevel => $loglevel
60+
logoutput => $debug
6961
}
7062

7163
php::augeas { 'php-load-phalcon-2.0':
72-
entry => 'phalconphp/extension',
73-
value => 'phalcon.so',
74-
target => "${php::config_dir}/${ini_file}",
75-
require => [
64+
entry => 'phalconphp/extension',
65+
value => 'phalcon.so',
66+
target => "${php::config_dir}/${ini_file}",
67+
require => [
7668
File["${php::config_dir}/${ini_file}"],
77-
Exec['remove-phalcon-src-2.0']],
78-
loglevel => $loglevel
69+
Exec['remove-phalcon-src-2.0']]
7970
}
8071
} else {
8172
exec { 'install-phalcon-1.x':
@@ -98,13 +89,12 @@
9889
}
9990

10091
php::augeas { 'php-load-phalcon-1.x':
101-
entry => 'phalconphp/extension',
102-
target => "${php::config_dir}/${ini_file}",
103-
value => 'phalcon.so',
104-
require => [
92+
entry => 'phalconphp/extension',
93+
target => "${php::config_dir}/${ini_file}",
94+
value => 'phalcon.so',
95+
require => [
10596
File["${php::config_dir}/${ini_file}"],
106-
Exec['remove-phalcon-src-1.x']],
107-
loglevel => $loglevel
97+
Exec['remove-phalcon-src-1.x']]
10898
}
10999
}
110100
}

manifests/init.pp

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,39 +59,30 @@
5959
$compat_sys_deps = false,
6060
$custom_ini = true,
6161
$ini_file = "phalcon.ini",
62-
$debug = false,
63-
$loglevel = 'warning') {
62+
$debug = false) {
6463
# Install the system dependencies
6564
if $ensure_sys_deps == true {
66-
class { 'phalconphp::deps::sys':
67-
each_compat => $compat_sys_deps,
68-
loglevel => $loglevel
69-
}
65+
class { 'phalconphp::deps::sys': each_compat => $compat_sys_deps }
7066
}
7167

7268
# Install zephir
7369
if $install_zephir == true {
74-
class { 'phalconphp::deps::zephir':
75-
debug => $debug,
76-
loglevel => $loglevel
77-
}
70+
class { 'phalconphp::deps::zephir': debug => $debug }
7871
}
7972

8073
# Install the actual framework
8174
class { 'phalconphp::framework':
8275
version => $ensure,
8376
zephir_build => $zephir_build,
8477
ini_file => $ini_file,
85-
debug => $debug,
86-
loglevel => $loglevel
78+
debug => $debug
8779
}
8880

8981
# Install the phalconphp dev tools
9082
if $install_devtools == true {
9183
class { 'phalconphp::deps::devtools':
92-
version => $devtools_version,
93-
debug => $debug,
94-
loglevel => $loglevel
84+
version => $devtools_version,
85+
debug => $debug
9586
}
9687
}
9788
}

0 commit comments

Comments
 (0)