Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Update composer via cron, not exec.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikhensema committed Apr 16, 2018
1 parent 5a40acd commit ea5d502
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@
require => Exec['composer-install'],
}

if $auto_update {
exec { 'composer-update':
command => "${composer_full_path} self-update",
environment => [ "COMPOSER_HOME=${target_dir}" ],
user => $user,
require => File["${target_dir}/${command_name}"],
}
cron { 'composer-update':
ensure => $auto_update ? { true => present, false => absent },
command => "env COMPOSER_HOME=${composer_target_dir} ${composer_full_path} self-update -q",
hour => 0,
minute => fqdn_rand(60),
user => $composer_user,
require => File["${composer_target_dir}/${composer_command_name}"],
}
}

0 comments on commit ea5d502

Please sign in to comment.