From 9a6b009844e50f8a1f36e761e67b1a481685b427 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 26 Feb 2018 08:47:51 +0100 Subject: [PATCH] Fix crontab --- modules/role/manifests/cryptoportfolio.pp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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, -- 2.41.0