Re: [Puppet Users] Unable to solve a require statement

2018-03-07 Thread jcbollinger


On Tuesday, March 6, 2018 at 1:50:28 PM UTC-6, P.C. Kroon wrote:
>
> Hi Jochen,
>
>  
>
> I’m going to give this back to the rest of the list since I’m out of my 
> depth, and I don’t have the time to figure out the details at the moment. 
> Good luck though 
>

In the first place, since you are using dpkg instead of apt to install the 
DEB, and especially to the extent that you care which of the two 
alternative packages are used to satisfy the package dependency, your 
Package['wpcli'] should express a direct or indirect resource dependency on 
the MySQL client Package you want to use.  Since you're using 
puppetlabs-mysql, perhaps you want to depend on Class['::mysql::client'], 
but if you're wrapping that inside a profile (different from the one in 
which your problem occurs), then you should probably depend on the profile 
class instead.  As a matter of good form and style, however, you should not 
attempt to express relationships with resources managed by other classes, 
especially across module boundaries.

You may express an explicit relationship with the DEB File resource, too, 
but you do not need to do, because Puppet will automatically generate 
dependencies between Packages and their managed source files (see the 
"Autorequires" section in the resource type's documentation 
).

Thus, you might want something like this:

$debfile = '/tmp/php-wpcli_latest_all.deb'

file { "$debfile" : 
  ensure => 'file', 
  source => 'puppet:///modules/profile/wordpress/php-wpcli_1.5.0_all.deb', 
} 

package { 'wpcli': 
  ensure   => 'installed', 
  provider => 'dpkg', 
  source   => "$debfile", 
}

# 1. This assumes that you have a profile class '::profile::mysql_client' 
wrapping the PL
#::mysql::client class.  If not, then you could depend directly on
#Class['::mysql::client'].
# 2. You could express this same relationship with a 'require' attribute, 
if you prefer.
Class['::profile::mysql_client'] -> Package['wpcli']


Note well that for the dependency on your profile class to work reliably, 
you need to ensure that the profile provides proper containment 
 of the 
appropriate application class (e.g. ::mysql::client), which you would 
achieve via appropriate use of the contain 
 function / 
statement.

Ultimately, what I'm describing as not very different from what Peter 
recommended.  It may be that I've hit on a key detail that he missed, but 
without more information about your manifest set, it's hard to confidently 
offer a solution.  If the above does not solve your problem, then I think 
it would behoove you to present a minimal yet complete example manifest set 
that reproduces the problem for you, primarily stripped-down versions of 
the manifests you and your organization wrote.  Supposing that you're using 
off-the-shelf puppetlabs-mysql, do not include any of its manifests, but 
do, please, tell us which version you are using.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/bcbcbca8-1c8e-4064-af42-20797890f5b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: [Puppet Users] Unable to solve a require statement

2018-03-06 Thread P C Kroon
Hi Jochen,

I’m going to give this back to the rest of the list since I’m out of my depth, 
and I don’t have the time to figure out the details at the moment. Good luck 
though 

Peter

From: Jochen Haeberle
Sent: 06 March 2018 00:48
To: puppet-users@googlegroups.com
Subject: Re: [Puppet Users] Unable to solve a require statement

Hi Peter,

The MySQL profile does indeed install the MySQL-client. But I can’t require it 
in the other profile class.

In class profile::software::wordpress I put  require profile::software::mysql, 
where I call the puppetlabs-mysql module to do the actual installation. Is 
there a better way to  describe the dependency?

Jochen

Am 05.03.2018 um 21:19 schrieb P C Kroon <p.c.kr...@rug.nl>:

Hi,
 
Make sure you have that module also install the MySQL client, and require 
mysql::client. I’m deliberately vague on the exact syntax since I’m not sure.
 
Peter
 
From: Jochen Haeberle
Sent: 03 March 2018 13:43
To: puppet-users@googlegroups.com
Subject: Re: [Puppet Users] Unable to solve a require statement
 
Hi Peter,
 
Thanks for the tip. I tried that already, but it results in a
 
Error: Could not find resource 'Package[mysql-client]' in parameter 'require' 
(file: 
/etc/puppetlabs/code/environments/production/modules/profile/manifests/software/wordpress.pp,
 line: 26) on node stretch.localdomain
 
I tried to require my profile::mysql class, where it set up the mailserver 
using puppetlabs-mysql, but this does not help.
 
Thanks,
Jochen
 
Am 02.03.2018 um 19:08 schrieb P C Kroon <p.c.kr...@rug.nl>:
 
Hi Jochen,
 
Try the following:
require => [File[‘php-wpcli_latest_all.deb’], Package[‘mysql-client’]],
 
HTH
Peter
 
From: Jochen Häberle
Sent: 02 March 2018 04:56
To: puppet-users@googlegroups.com
Subject: [Puppet Users] Unable to solve a require statement
 
Hi,
 
I am having a problem installing wp-cli alongside MySQL on Debian 9.3 using 
latest Puppet 5.4
 
I am using rotes and Profiles and in my wordpress.pp I have:
 
# WP-CLI
# TODO install latest wp-cli
file { 'php-wpcli_latest_all.deb':
   path => '/tmp/php-wpcli_latest_all.deb',
   ensure => 'file',
   source => 'puppet:///modules/profile/wordpress/php-wpcli_1.5.0_all.deb',
}
 
package { 'wpcli':
   provider => dpkg,
   ensure   => installed,
   source   => '/tmp/php-wpcli_latest_all.deb',
#   require  => File['php-wpcli_latest_all.deb'],
#   require  => Service['mysql'],
#   require  => Service['mysql'],
}
 
You see some of the require Statements I already tried ;-)
 
To install MySQL (or MariaDB) I am using puppetlabs/mysql module from the 
Forge. I am setting this up in a mysql Profile which I require in the former 
mentioned wordpress.pp.
 
In my node definition, I include mysql.pp before wordpress.pp
 
The error I get is the following (among similar ones):
 
Error: Execution of '/usr/bin/dpkg --force-confold -i 
/tmp/php-wpcli_latest_all.deb' returned 1: Selecting previously unselected 
package php-wpcli.
(Reading database ... 62113 files and directories currently installed.)
Preparing to unpack /tmp/php-wpcli_latest_all.deb ...
Unpacking php-wpcli (1.5.0) ...
dpkg: dependency problems prevent configuration of php-wpcli:
php-wpcli depends on mysql-client | mariadb-client; however:
  Package mysql-client is not installed.
  Package mariadb-client is not installed.
 
dpkg: error processing package php-wpcli (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
php-wpcli
Error: /Stage[main]/Profile::Software::Wordpress/Package[wpcli]/ensure: change 
from 'purged' to 'present' failed: Execution of '/usr/bin/dpkg --force-confold 
-i /tmp/php-wpcli_latest_all.deb' returned 1: Selecting previously unselected 
package php-wpcli.
(Reading database ... 62113 files and directories currently installed.)
Preparing to unpack /tmp/php-wpcli_latest_all.deb ...
Unpacking php-wpcli (1.5.0) ...
dpkg: dependency problems prevent configuration of php-wpcli:
php-wpcli depends on mysql-client | mariadb-client; however:
  Package mysql-client is not installed.
  Package mariadb-client is not installed.
 
dpkg: error processing package php-wpcli (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
php-wpcli
 
 
as I can install wp-cli using puppet when MySQL is already installed through 
puppet, this is clearly an issue of sequence. But I cannot find a way to solve 
this and to have MySQL installied before wp-cli.
 
Can anyone help me out, please?
 
Thanks, erhards
 
Jochen
 
 
 
  
 
-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/19ADAF36-F85F-

Re: [Puppet Users] Unable to solve a require statement

2018-03-06 Thread Jochen Haeberle
Hi Peter,

The MySQL profile does indeed install the MySQL-client. But I can’t require it 
in the other profile class.

In class profile::software::wordpress I put  require profile::software::mysql, 
where I call the puppetlabs-mysql module to do the actual installation. Is 
there a better way to  describe the dependency?

Jochen

> Am 05.03.2018 um 21:19 schrieb P C Kroon <p.c.kr...@rug.nl 
> <mailto:p.c.kr...@rug.nl>>:
> 
> Hi,
>  
> Make sure you have that module also install the MySQL client, and require 
> mysql::client. I’m deliberately vague on the exact syntax since I’m not sure.
>  
> Peter
>  
> From: Jochen Haeberle <mailto:jochen.haebe...@gmail.com>
> Sent: 03 March 2018 13:43
> To: puppet-users@googlegroups.com <mailto:puppet-users@googlegroups.com>
> Subject: Re: [Puppet Users] Unable to solve a require statement
>  
> Hi Peter,
>  
> Thanks for the tip. I tried that already, but it results in a
>  
> Error: Could not find resource 'Package[mysql-client]' in parameter 'require' 
> (file: 
> /etc/puppetlabs/code/environments/production/modules/profile/manifests/software/wordpress.pp,
>  line: 26) on node stretch.localdomain
>  
> I tried to require my profile::mysql class, where it set up the mailserver 
> using puppetlabs-mysql, but this does not help.
>  
> Thanks,
> Jochen
>  
> Am 02.03.2018 um 19:08 schrieb P C Kroon <p.c.kr...@rug.nl 
> <mailto:p.c.kr...@rug.nl>>:
>  
> Hi Jochen,
>  
> Try the following:
> require => [File[‘php-wpcli_latest_all.deb’], Package[‘mysql-client’]],
>  
> HTH
> Peter
>  
> From: Jochen Häberle <mailto:jochen.haebe...@gmail.com>
> Sent: 02 March 2018 04:56
> To: puppet-users@googlegroups.com <mailto:puppet-users@googlegroups.com>
> Subject: [Puppet Users] Unable to solve a require statement
>  
> Hi,
>  
> I am having a problem installing wp-cli alongside MySQL on Debian 9.3 using 
> latest Puppet 5.4
>  
> I am using rotes and Profiles and in my wordpress.pp I have:
>  
> # WP-CLI
> # TODO install latest wp-cli
> file { 'php-wpcli_latest_all.deb':
>path => '/tmp/php-wpcli_latest_all.deb',
>ensure => 'file',
>source => 'puppet:///modules/profile/wordpress/php-wpcli_1.5.0_all.deb 
> ',
> }
>  
> package { 'wpcli':
>provider => dpkg,
>ensure   => installed,
>source   => '/tmp/php-wpcli_latest_all.deb',
> #   require  => File['php-wpcli_latest_all.deb'],
> #   require  => Service['mysql'],
> #   require  => Service['mysql'],
> }
>  
> You see some of the require Statements I already tried ;-)
>  
> To install MySQL (or MariaDB) I am using puppetlabs/mysql module from the 
> Forge. I am setting this up in a mysql Profile which I require in the former 
> mentioned wordpress.pp.
>  
> In my node definition, I include mysql.pp before wordpress.pp
>  
> The error I get is the following (among similar ones):
>  
> Error: Execution of '/usr/bin/dpkg --force-confold -i 
> /tmp/php-wpcli_latest_all.deb' returned 1: Selecting previously unselected 
> package php-wpcli.
> (Reading database ... 62113 files and directories currently installed.)
> Preparing to unpack /tmp/php-wpcli_latest_all.deb ...
> Unpacking php-wpcli (1.5.0) ...
> dpkg: dependency problems prevent configuration of php-wpcli:
> php-wpcli depends on mysql-client | mariadb-client; however:
>   Package mysql-client is not installed.
>   Package mariadb-client is not installed.
>  
> dpkg: error processing package php-wpcli (--install):
> dependency problems - leaving unconfigured
> Processing triggers for man-db (2.7.6.1-2) ...
> Errors were encountered while processing:
> php-wpcli
> Error: /Stage[main]/Profile::Software::Wordpress/Package[wpcli]/ensure: 
> change from 'purged' to 'present' failed: Execution of '/usr/bin/dpkg 
> --force-confold -i /tmp/php-wpcli_latest_all.deb' returned 1: Selecting 
> previously unselected package php-wpcli.
> (Reading database ... 62113 files and directories currently installed.)
> Preparing to unpack /tmp/php-wpcli_latest_all.deb ...
> Unpacking php-wpcli (1.5.0) ...
> dpkg: dependency problems prevent configuration of php-wpcli:
> php-wpcli depends on mysql-client | mariadb-client; however:
>   Package mysql-client is not installed.
>   Package mariadb-client is not installed.
>  
> dpkg: error processing package php-wpcli (--install):
> dependency problems - leaving unconfigured
> Processing triggers for man-db (2.7.6.1-2) ...
> Errors were encountered while processing:
> php-wpcli
>  
>  
> as I can install wp-cli using puppet when MySQL is already installed through 
> puppet, this is clearly an issue of sequence. B

RE: [Puppet Users] Unable to solve a require statement

2018-03-05 Thread P C Kroon
Hi,

Make sure you have that module also install the MySQL client, and require 
mysql::client. I’m deliberately vague on the exact syntax since I’m not sure.

Peter

From: Jochen Haeberle
Sent: 03 March 2018 13:43
To: puppet-users@googlegroups.com
Subject: Re: [Puppet Users] Unable to solve a require statement

Hi Peter,

Thanks for the tip. I tried that already, but it results in a

Error: Could not find resource 'Package[mysql-client]' in parameter 'require' 
(file: 
/etc/puppetlabs/code/environments/production/modules/profile/manifests/software/wordpress.pp,
 line: 26) on node stretch.localdomain

I tried to require my profile::mysql class, where it set up the mailserver 
using puppetlabs-mysql, but this does not help.

Thanks,
Jochen

Am 02.03.2018 um 19:08 schrieb P C Kroon <p.c.kr...@rug.nl>:

Hi Jochen,
 
Try the following:
require => [File[‘php-wpcli_latest_all.deb’], Package[‘mysql-client’]],
 
HTH
Peter
 
From: Jochen Häberle
Sent: 02 March 2018 04:56
To: puppet-users@googlegroups.com
Subject: [Puppet Users] Unable to solve a require statement
 
Hi,
 
I am having a problem installing wp-cli alongside MySQL on Debian 9.3 using 
latest Puppet 5.4
 
I am using rotes and Profiles and in my wordpress.pp I have:
 
# WP-CLI
# TODO install latest wp-cli
file { 'php-wpcli_latest_all.deb':
   path => '/tmp/php-wpcli_latest_all.deb',
   ensure => 'file',
   source => 'puppet:///modules/profile/wordpress/php-wpcli_1.5.0_all.deb',
}
 
package { 'wpcli':
   provider => dpkg,
   ensure   => installed,
   source   => '/tmp/php-wpcli_latest_all.deb',
#   require  => File['php-wpcli_latest_all.deb'],
#   require  => Service['mysql'],
#   require  => Service['mysql'],
}
 
You see some of the require Statements I already tried ;-)
 
To install MySQL (or MariaDB) I am using puppetlabs/mysql module from the 
Forge. I am setting this up in a mysql Profile which I require in the former 
mentioned wordpress.pp.
 
In my node definition, I include mysql.pp before wordpress.pp
 
The error I get is the following (among similar ones):
 
Error: Execution of '/usr/bin/dpkg --force-confold -i 
/tmp/php-wpcli_latest_all.deb' returned 1: Selecting previously unselected 
package php-wpcli.
(Reading database ... 62113 files and directories currently installed.)
Preparing to unpack /tmp/php-wpcli_latest_all.deb ...
Unpacking php-wpcli (1.5.0) ...
dpkg: dependency problems prevent configuration of php-wpcli:
php-wpcli depends on mysql-client | mariadb-client; however:
  Package mysql-client is not installed.
  Package mariadb-client is not installed.
 
dpkg: error processing package php-wpcli (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
php-wpcli
Error: /Stage[main]/Profile::Software::Wordpress/Package[wpcli]/ensure: change 
from 'purged' to 'present' failed: Execution of '/usr/bin/dpkg --force-confold 
-i /tmp/php-wpcli_latest_all.deb' returned 1: Selecting previously unselected 
package php-wpcli.
(Reading database ... 62113 files and directories currently installed.)
Preparing to unpack /tmp/php-wpcli_latest_all.deb ...
Unpacking php-wpcli (1.5.0) ...
dpkg: dependency problems prevent configuration of php-wpcli:
php-wpcli depends on mysql-client | mariadb-client; however:
  Package mysql-client is not installed.
  Package mariadb-client is not installed.
 
dpkg: error processing package php-wpcli (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
php-wpcli
 
 
as I can install wp-cli using puppet when MySQL is already installed through 
puppet, this is clearly an issue of sequence. But I cannot find a way to solve 
this and to have MySQL installied before wp-cli.
 
Can anyone help me out, please?
 
Thanks, erhards
 
Jochen
 
 
 
  
 
-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/19ADAF36-F85F-445E-AF5C-B59E47237BB8%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5a99930e.46d3620a.a69c6.203e%40mx.google.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsu

Re: [Puppet Users] Unable to solve a require statement

2018-03-03 Thread Jochen Haeberle
Hi Peter,

Thanks for the tip. I tried that already, but it results in a

Error: Could not find resource 'Package[mysql-client]' in parameter 'require' 
(file: 
/etc/puppetlabs/code/environments/production/modules/profile/manifests/software/wordpress.pp,
 line: 26) on node stretch.localdomain

I tried to require my profile::mysql class, where it set up the mailserver 
using puppetlabs-mysql, but this does not help.

Thanks,
Jochen

> Am 02.03.2018 um 19:08 schrieb P C Kroon <p.c.kr...@rug.nl 
> <mailto:p.c.kr...@rug.nl>>:
> 
> Hi Jochen,
>  
> Try the following:
> require => [File[‘php-wpcli_latest_all.deb’], Package[‘mysql-client’]],
>  
> HTH
> Peter
>  
> From: Jochen Häberle <mailto:jochen.haebe...@gmail.com>
> Sent: 02 March 2018 04:56
> To: puppet-users@googlegroups.com <mailto:puppet-users@googlegroups.com>
> Subject: [Puppet Users] Unable to solve a require statement
>  
> Hi,
>  
> I am having a problem installing wp-cli alongside MySQL on Debian 9.3 using 
> latest Puppet 5.4
>  
> I am using rotes and Profiles and in my wordpress.pp I have:
>  
> # WP-CLI
> # TODO install latest wp-cli
> file { 'php-wpcli_latest_all.deb':
>path => '/tmp/php-wpcli_latest_all.deb',
>ensure => 'file',
>source => 'puppet:///modules/profile/wordpress/php-wpcli_1.5.0_all.deb 
> ',
> }
>  
> package { 'wpcli':
>provider => dpkg,
>ensure   => installed,
>source   => '/tmp/php-wpcli_latest_all.deb',
> #   require  => File['php-wpcli_latest_all.deb'],
> #   require  => Service['mysql'],
> #   require  => Service['mysql'],
> }
>  
> You see some of the require Statements I already tried ;-)
>  
> To install MySQL (or MariaDB) I am using puppetlabs/mysql module from the 
> Forge. I am setting this up in a mysql Profile which I require in the former 
> mentioned wordpress.pp.
>  
> In my node definition, I include mysql.pp before wordpress.pp
>  
> The error I get is the following (among similar ones):
>  
> Error: Execution of '/usr/bin/dpkg --force-confold -i 
> /tmp/php-wpcli_latest_all.deb' returned 1: Selecting previously unselected 
> package php-wpcli.
> (Reading database ... 62113 files and directories currently installed.)
> Preparing to unpack /tmp/php-wpcli_latest_all.deb ...
> Unpacking php-wpcli (1.5.0) ...
> dpkg: dependency problems prevent configuration of php-wpcli:
> php-wpcli depends on mysql-client | mariadb-client; however:
>   Package mysql-client is not installed.
>   Package mariadb-client is not installed.
>  
> dpkg: error processing package php-wpcli (--install):
> dependency problems - leaving unconfigured
> Processing triggers for man-db (2.7.6.1-2) ...
> Errors were encountered while processing:
> php-wpcli
> Error: /Stage[main]/Profile::Software::Wordpress/Package[wpcli]/ensure: 
> change from 'purged' to 'present' failed: Execution of '/usr/bin/dpkg 
> --force-confold -i /tmp/php-wpcli_latest_all.deb' returned 1: Selecting 
> previously unselected package php-wpcli.
> (Reading database ... 62113 files and directories currently installed.)
> Preparing to unpack /tmp/php-wpcli_latest_all.deb ...
> Unpacking php-wpcli (1.5.0) ...
> dpkg: dependency problems prevent configuration of php-wpcli:
> php-wpcli depends on mysql-client | mariadb-client; however:
>   Package mysql-client is not installed.
>   Package mariadb-client is not installed.
>  
> dpkg: error processing package php-wpcli (--install):
> dependency problems - leaving unconfigured
> Processing triggers for man-db (2.7.6.1-2) ...
> Errors were encountered while processing:
> php-wpcli
>  
>  
> as I can install wp-cli using puppet when MySQL is already installed through 
> puppet, this is clearly an issue of sequence. But I cannot find a way to 
> solve this and to have MySQL installied before wp-cli.
>  
> Can anyone help me out, please?
>  
> Thanks, erhards
>  
> Jochen
>  
>  
>  
>   
>  
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com 
> <mailto:puppet-users+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/19ADAF36-F85F-445E-AF5C-B59E47237BB8%40gmail.com
>  
> <https://groups.google.com/d/msgid/puppet-users/19ADAF36-F85F-445E-AF5C-B59E47237BB8%40gmail.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
>  
> 
> -- 
> You received this message because you are sub

RE: [Puppet Users] Unable to solve a require statement

2018-03-02 Thread P C Kroon
Hi Jochen,

Try the following:
require => [File[‘php-wpcli_latest_all.deb’], Package[‘mysql-client’]],

HTH
Peter

From: Jochen Häberle
Sent: 02 March 2018 04:56
To: puppet-users@googlegroups.com
Subject: [Puppet Users] Unable to solve a require statement

Hi,

I am having a problem installing wp-cli alongside MySQL on Debian 9.3 using 
latest Puppet 5.4

I am using rotes and Profiles and in my wordpress.pp I have:

 # WP-CLI
 # TODO install latest wp-cli
 file { 'php-wpcli_latest_all.deb':
   path => '/tmp/php-wpcli_latest_all.deb',
   ensure => 'file',
   source => 'puppet:///modules/profile/wordpress/php-wpcli_1.5.0_all.deb',
 }

 package { 'wpcli':
   provider => dpkg,
   ensure   => installed,
   source   => '/tmp/php-wpcli_latest_all.deb',
#   require  => File['php-wpcli_latest_all.deb'],
#   require  => Service['mysql'],
#   require  => Service['mysql'],
 }

You see some of the require Statements I already tried ;-)

To install MySQL (or MariaDB) I am using puppetlabs/mysql module from the 
Forge. I am setting this up in a mysql Profile which I require in the former 
mentioned wordpress.pp.

In my node definition, I include mysql.pp before wordpress.pp

The error I get is the following (among similar ones):

Error: Execution of '/usr/bin/dpkg --force-confold -i 
/tmp/php-wpcli_latest_all.deb' returned 1: Selecting previously unselected 
package php-wpcli.
(Reading database ... 62113 files and directories currently installed.)
Preparing to unpack /tmp/php-wpcli_latest_all.deb ...
Unpacking php-wpcli (1.5.0) ...
dpkg: dependency problems prevent configuration of php-wpcli:
 php-wpcli depends on mysql-client | mariadb-client; however:
  Package mysql-client is not installed.
  Package mariadb-client is not installed.

dpkg: error processing package php-wpcli (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
 php-wpcli
Error: /Stage[main]/Profile::Software::Wordpress/Package[wpcli]/ensure: change 
from 'purged' to 'present' failed: Execution of '/usr/bin/dpkg --force-confold 
-i /tmp/php-wpcli_latest_all.deb' returned 1: Selecting previously unselected 
package php-wpcli.
(Reading database ... 62113 files and directories currently installed.)
Preparing to unpack /tmp/php-wpcli_latest_all.deb ...
Unpacking php-wpcli (1.5.0) ...
dpkg: dependency problems prevent configuration of php-wpcli:
 php-wpcli depends on mysql-client | mariadb-client; however:
  Package mysql-client is not installed.
  Package mariadb-client is not installed.

dpkg: error processing package php-wpcli (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
 php-wpcli


as I can install wp-cli using puppet when MySQL is already installed through 
puppet, this is clearly an issue of sequence. But I cannot find a way to solve 
this and to have MySQL installied before wp-cli.

Can anyone help me out, please?

Thanks, erhards

Jochen



  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/19ADAF36-F85F-445E-AF5C-B59E47237BB8%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5a99930e.46d3620a.a69c6.203e%40mx.google.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Unable to solve a require statement

2018-03-02 Thread Jochen Häberle
Hi,

I am having a problem installing wp-cli alongside MySQL on Debian 9.3 using 
latest Puppet 5.4

I am using rotes and Profiles and in my wordpress.pp I have:

 # WP-CLI
 # TODO install latest wp-cli
 file { 'php-wpcli_latest_all.deb':
   path => '/tmp/php-wpcli_latest_all.deb',
   ensure => 'file',
   source => 'puppet:///modules/profile/wordpress/php-wpcli_1.5.0_all.deb',
 }

 package { 'wpcli':
   provider => dpkg,
   ensure   => installed,
   source   => '/tmp/php-wpcli_latest_all.deb',
#   require  => File['php-wpcli_latest_all.deb'],
#   require  => Service['mysql'],
#   require  => Service['mysql'],
 }

You see some of the require Statements I already tried ;-)

To install MySQL (or MariaDB) I am using puppetlabs/mysql module from the 
Forge. I am setting this up in a mysql Profile which I require in the former 
mentioned wordpress.pp.

In my node definition, I include mysql.pp before wordpress.pp

The error I get is the following (among similar ones):

Error: Execution of '/usr/bin/dpkg --force-confold -i 
/tmp/php-wpcli_latest_all.deb' returned 1: Selecting previously unselected 
package php-wpcli.
(Reading database ... 62113 files and directories currently installed.)
Preparing to unpack /tmp/php-wpcli_latest_all.deb ...
Unpacking php-wpcli (1.5.0) ...
dpkg: dependency problems prevent configuration of php-wpcli:
 php-wpcli depends on mysql-client | mariadb-client; however:
  Package mysql-client is not installed.
  Package mariadb-client is not installed.

dpkg: error processing package php-wpcli (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
 php-wpcli
Error: /Stage[main]/Profile::Software::Wordpress/Package[wpcli]/ensure: change 
from 'purged' to 'present' failed: Execution of '/usr/bin/dpkg --force-confold 
-i /tmp/php-wpcli_latest_all.deb' returned 1: Selecting previously unselected 
package php-wpcli.
(Reading database ... 62113 files and directories currently installed.)
Preparing to unpack /tmp/php-wpcli_latest_all.deb ...
Unpacking php-wpcli (1.5.0) ...
dpkg: dependency problems prevent configuration of php-wpcli:
 php-wpcli depends on mysql-client | mariadb-client; however:
  Package mysql-client is not installed.
  Package mariadb-client is not installed.

dpkg: error processing package php-wpcli (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
 php-wpcli


as I can install wp-cli using puppet when MySQL is already installed through 
puppet, this is clearly an issue of sequence. But I cannot find a way to solve 
this and to have MySQL installied before wp-cli.

Can anyone help me out, please?

Thanks, erhards

Jochen



  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/19ADAF36-F85F-445E-AF5C-B59E47237BB8%40gmail.com.
For more options, visit https://groups.google.com/d/optout.