From f4d7c67f4cfacf315d112c540a0fe858a7032bf7 Mon Sep 17 00:00:00 2001 From: Alex Knol Date: Wed, 13 Nov 2013 11:46:13 +0100 Subject: [PATCH 01/10] added $remote_connect_back config option, default 0 --- manifests/config.pp | 20 +++++++++++++------- templates/ini_file.erb | 1 + 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index 0553cf0..cc6315c 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,12 +1,13 @@ define xdebug::config ( #Template variables - $ini_file_path = '', - $default_enable = '', - $remote_enable = '', - $remote_handler = '', - $remote_host = '', - $remote_port = '', - $remote_autostart = '', + $ini_file_path = '', + $default_enable = '', + $remote_enable = '', + $remote_handler = '', + $remote_host = '', + $remote_port = '', + $remote_autostart = '', + $remote_connect_back = '', ) { @@ -46,6 +47,11 @@ default => $remote_autostart, } + $xdebug_remote_connect_back = $remote_connect_back ? { + '' => '0', + default => $remote_connect_back, + } + file { "$xdebug_ini_file_path" : content => template('xdebug/ini_file.erb'), ensure => present, diff --git a/templates/ini_file.erb b/templates/ini_file.erb index 8e555b9..3500240 100644 --- a/templates/ini_file.erb +++ b/templates/ini_file.erb @@ -5,3 +5,4 @@ xdebug.remote_handler=<%= remote_handler %> xdebug.remote_host=<%= remote_host %> xdebug.remote_port=<%= remote_port %> xdebug.remote_autostart=<%= remote_autostart %> +xdebug.remote_connect_back=<%= remote_connect_back %> From 559bdff872d8633f48f9349376a0f4c3a2e89f61 Mon Sep 17 00:00:00 2001 From: Alex Knol Date: Wed, 13 Nov 2013 15:06:03 +0100 Subject: [PATCH 02/10] removed apache2 dependency --- manifests/config.pp | 1 - manifests/debian.pp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index cc6315c..106d2f6 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -56,6 +56,5 @@ content => template('xdebug/ini_file.erb'), ensure => present, require => Package['xdebug'], - notify => Service['apache2'], } } \ No newline at end of file diff --git a/manifests/debian.pp b/manifests/debian.pp index 41d8bcf..e886b00 100644 --- a/manifests/debian.pp +++ b/manifests/debian.pp @@ -5,7 +5,7 @@ package { "xdebug": name => $xdebug::params::pkg, ensure => installed, - require => Class['php'], + require => Package['php-cli'], } } \ No newline at end of file From 65368af08a67a69f58230d8c8c0e551a0adb5139 Mon Sep 17 00:00:00 2001 From: Alex Knol Date: Thu, 14 Nov 2013 16:30:46 +0100 Subject: [PATCH 03/10] changed php5-cli dependency --- manifests/debian.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/debian.pp b/manifests/debian.pp index e886b00..2b75709 100644 --- a/manifests/debian.pp +++ b/manifests/debian.pp @@ -5,7 +5,7 @@ package { "xdebug": name => $xdebug::params::pkg, ensure => installed, - require => Package['php-cli'], + require => Package['php5-cli'], } } \ No newline at end of file From 41aa9e960904385b9264b0c229f1b1cb6695e8f7 Mon Sep 17 00:00:00 2001 From: Alex Knol Date: Fri, 20 Dec 2013 09:43:59 +0100 Subject: [PATCH 04/10] changed comment identifier --- templates/ini_file.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/ini_file.erb b/templates/ini_file.erb index 3500240..1f60d9d 100644 --- a/templates/ini_file.erb +++ b/templates/ini_file.erb @@ -1,4 +1,4 @@ -# File Managed by Puppet +;File Managed by Puppet xdebug.default_enable=<%= default_enable %> xdebug.remote_enable=<%= remote_enable %> xdebug.remote_handler=<%= remote_handler %> From 49812c0ef3e901a6276b3e5d2655e5f75b32269e Mon Sep 17 00:00:00 2001 From: Alex Knol Date: Fri, 20 Dec 2013 09:46:21 +0100 Subject: [PATCH 05/10] changed comment identifier --- README.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 2b166e2..1a2aacf 100644 --- a/README.md +++ b/README.md @@ -10,22 +10,23 @@ Depends on (tested with) Example usage: include xdebug - -Advanced configuration: - - xdebug::config { 'default': - remote_host => '169.254.0.1', # Vagrant users can specify their address - remote_port => '9000', # Change default settings - } + +Advanced configuration: + + xdebug::config { 'default': + remote_host => '169.254.0.1', # Vagrant users can specify their address + remote_port => '9000', # Change default settings + } Author: Stefan Kögel +Contributor: Alex Knol -GitHub: git@github.com:stkoegel/puppet-xdebug.git +GitHub: git@github.com:Elexy/puppet-xdebug.git Changelog: - + * Version 0.1 - Initial Commit for Debian/Ubuntu and three config values -* Version 0.2 - Add xdebug configuration options +* Version 0.2 - Add xdebug configuration options ToDo: -- add support for RedHat and other os \ No newline at end of file +- add support for RedHat and other os From 3dd3c94467f7457a985bca9ece143f0133e7b023 Mon Sep 17 00:00:00 2001 From: Alex Knol Date: Fri, 20 Dec 2013 09:54:22 +0100 Subject: [PATCH 06/10] reverted github URL --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a2aacf..c84af2b 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Advanced configuration: Author: Stefan Kögel Contributor: Alex Knol -GitHub: git@github.com:Elexy/puppet-xdebug.git +GitHub: git@github.com:stkoegel/puppet-xdebug.git Changelog: From 8ecc820575bd402e1225a6f56e13c310af1cbd1e Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 29 Oct 2014 12:51:56 +0100 Subject: [PATCH 07/10] added gitignore, new var syntax in template --- templates/ini_file.erb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/ini_file.erb b/templates/ini_file.erb index 1f60d9d..a1508e7 100644 --- a/templates/ini_file.erb +++ b/templates/ini_file.erb @@ -1,8 +1,8 @@ ;File Managed by Puppet -xdebug.default_enable=<%= default_enable %> -xdebug.remote_enable=<%= remote_enable %> -xdebug.remote_handler=<%= remote_handler %> -xdebug.remote_host=<%= remote_host %> -xdebug.remote_port=<%= remote_port %> -xdebug.remote_autostart=<%= remote_autostart %> -xdebug.remote_connect_back=<%= remote_connect_back %> +xdebug.default_enable=<%= @default_enable %> +xdebug.remote_enable=<%= @remote_enable %> +xdebug.remote_handler=<%= @remote_handler %> +xdebug.remote_host=<%= @remote_host %> +xdebug.remote_port=<%= @remote_port %> +xdebug.remote_autostart=<%= @remote_autostart %> +xdebug.remote_connect_back=<%= @remote_connect_back %> From 336721f8fe9a60827ec51ec86c03c56c8277f0c7 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 29 Oct 2014 14:04:03 +0100 Subject: [PATCH 08/10] using diferent ini location --- manifests/config.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index 106d2f6..0f2ab08 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -13,7 +13,7 @@ #Template variables default values $xdebug_ini_file_path = $ini_file_path ? { - '' => '/etc/php5/conf.d/xdebug_config.ini', + '' => '/etc/php5/mods-available/xdebug.ini', default => $ini_file_path, } @@ -57,4 +57,4 @@ ensure => present, require => Package['xdebug'], } -} \ No newline at end of file +} From e9919da15948456f7030cadf96ecd71aa4821a48 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 29 Oct 2014 14:31:30 +0100 Subject: [PATCH 09/10] added php5enmod --- manifests/debian.pp | 10 ++++++++-- templates/ini_file.erb | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/manifests/debian.pp b/manifests/debian.pp index 2b75709..f50ff4d 100644 --- a/manifests/debian.pp +++ b/manifests/debian.pp @@ -1,11 +1,17 @@ class xdebug::debian { include xdebug::params - + package { "xdebug": name => $xdebug::params::pkg, ensure => installed, require => Package['php5-cli'], } -} \ No newline at end of file + exec { 'enable_xdebug': + command => 'php5enmod xdebug && php5enmod -s cli xdebug', + user => root, + require => [Package['php5-cli'], + } + +} diff --git a/templates/ini_file.erb b/templates/ini_file.erb index a1508e7..5d4fe00 100644 --- a/templates/ini_file.erb +++ b/templates/ini_file.erb @@ -1,4 +1,5 @@ ;File Managed by Puppet +zend_extension="/usr/local/php/modules/xdebug_config.so" xdebug.default_enable=<%= @default_enable %> xdebug.remote_enable=<%= @remote_enable %> xdebug.remote_handler=<%= @remote_handler %> From b5afc47bcaef892a5c0ce744cd39eb177f584867 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 30 Oct 2014 16:45:31 +0100 Subject: [PATCH 10/10] enable mode, don\'t overwrite xdebug.ini --- .gitignore | 2 ++ manifests/config.pp | 2 +- manifests/debian.pp | 4 ++-- templates/ini_file.erb | 1 - 4 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2915f71 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +atlassian* diff --git a/manifests/config.pp b/manifests/config.pp index 0f2ab08..f69c59f 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -13,7 +13,7 @@ #Template variables default values $xdebug_ini_file_path = $ini_file_path ? { - '' => '/etc/php5/mods-available/xdebug.ini', + '' => '/etc/php5/mods-available/xdebug_config.ini', default => $ini_file_path, } diff --git a/manifests/debian.pp b/manifests/debian.pp index f50ff4d..70cf240 100644 --- a/manifests/debian.pp +++ b/manifests/debian.pp @@ -9,9 +9,9 @@ } exec { 'enable_xdebug': - command => 'php5enmod xdebug && php5enmod -s cli xdebug', + command => 'php5enmod xdebug && php5enmod -s cli xdebug && php5enmod xdebug_config && php5enmod -s cli xdebug_config', user => root, - require => [Package['php5-cli'], + require => [Package['php5-cli']], } } diff --git a/templates/ini_file.erb b/templates/ini_file.erb index 5d4fe00..a1508e7 100644 --- a/templates/ini_file.erb +++ b/templates/ini_file.erb @@ -1,5 +1,4 @@ ;File Managed by Puppet -zend_extension="/usr/local/php/modules/xdebug_config.so" xdebug.default_enable=<%= @default_enable %> xdebug.remote_enable=<%= @remote_enable %> xdebug.remote_handler=<%= @remote_handler %>