mirror of
https://gh.wpcy.net/https://github.com/Chassis/puppet-wp.git
synced 2026-04-26 13:03:48 +08:00
19 lines
384 B
Puppet
Executable file
19 lines
384 B
Puppet
Executable file
# A class for WP-CLI commands.
|
|
define wp::command (
|
|
$location,
|
|
$command,
|
|
$user = $::wp::user,
|
|
$unless = undef,
|
|
$onlyif = '/usr/bin/wp core is-installed',
|
|
) {
|
|
include wp::cli
|
|
|
|
exec {"${location} wp ${command}":
|
|
command => "/usr/bin/wp ${command}",
|
|
cwd => $location,
|
|
user => $user,
|
|
require => [ Class['wp::cli'] ],
|
|
unless => $unless,
|
|
onlyif => $onlyif,
|
|
}
|
|
}
|