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: [email protected] 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 [email protected]. 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 [email protected]. 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.
