From: Ismaƫl Bouya Date: Mon, 26 Feb 2018 07:47:51 +0000 (+0100) Subject: Fix crontab X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FPuppet.git;a=commitdiff_plain;h=9a6b009844e50f8a1f36e761e67b1a481685b427 Fix crontab --- diff --git a/modules/role/manifests/cryptoportfolio.pp b/modules/role/manifests/cryptoportfolio.pp index ee1c74f..32b6ac7 100644 --- a/modules/role/manifests/cryptoportfolio.pp +++ b/modules/role/manifests/cryptoportfolio.pp @@ -227,7 +227,11 @@ class role::cryptoportfolio { owner => $cf_user, group => $cf_group, mode => "0600", - content => template("role/cryptoportfolio/bot_config.ini.erb") + content => template("role/cryptoportfolio/bot_config.ini.erb"), + require => [ + User[$cf_user], + Archive["${cf_home}/${bot_version}.tar.gz"], + ], } cron { "py-cryptoportfolio-before": @@ -250,6 +254,7 @@ class role::cryptoportfolio { user => "cryptoportfolio", weekday => 1, # Monday hour => 1, + minute => 0, environment => ["HOME=${cf_home}","PATH=/usr/bin/"], require => [ File[$cf_bot_app_conf], @@ -258,6 +263,8 @@ class role::cryptoportfolio { } } + # FIXME: incorrect build for go app + # FIXME: restore backup unless empty($front_version) { ensure_packages(["go", "npm", "nodejs", "yarn"]) @@ -284,7 +291,7 @@ class role::cryptoportfolio { checksum => $front_sha256, cleanup => false, extract => true, - user => "cryptoportfolio", + user => $cf_user, username => $facts["ec2_metadata"]["hostname"], password => generate_password(24, $password_seed, "ldap"), extract_path => $cf_front_app,