Hi,
I am facing following error to copy full content of directory in multiple
location.
Error: Failed to apply catalog: Parameter command failed on Exec[copy]:
Command must be a String, got value of class Array at
/etc/puppet/modules/wordpress/manifests/wp.pp:23
wp.pp
=====
class wordpress::wp {
# Copy the Wordpress bundle to /tmp
file { '/tmp/latest.tar.gz':
ensure => present,
source => "puppet:///modules/wordpress/latest.tar.gz"
}
# Extract the Wordpress bundle
exec { 'extract':
cwd => "/tmp",
command => "tar -xvzf latest.tar.gz",
require => File['/tmp/latest.tar.gz'],
path => ['/bin'],
}
# Copy to /var/www/abc_com
exec { 'copy':
command => ["cp -r /tmp/wordpress/* /var/www/abc_com","cp -r
/tmp/wordpress/* /var/www/xyz_com"],
require => Exec['extract'],
path => ['/bin'],
}
# Generate the wp-config.php file using the template for abc.com
file { '/var/www/abc_com/wp-config.php':
ensure => present,
require => Exec['copy'],
content => template("wordpress/wp-config.php.abc")
}
file { '/var/www/xyz_com/wp-config.php':
ensure => present,
require => Exec['copy'],
content => template("wordpress/wp-config.php.xyz")
}
}
--
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/93937f5a-4008-4e84-a3bf-1c075d93785b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.