X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Frole%2Fmanifests%2Fcryptoportfolio.pp;h=d670486362adf528e0a91a4a4225b005f7b306fb;hb=6d512d3fc73ece6aba5842e73b3b662cd904433d;hp=9a2bfd2e54c2eae98f9c62e875349ec8ea31d7f3;hpb=b859262351650df3368d4f3fa49a487a7d9b35b7;p=perso%2FImmae%2FProjets%2FPuppet.git diff --git a/modules/role/manifests/cryptoportfolio.pp b/modules/role/manifests/cryptoportfolio.pp index 9a2bfd2..d670486 100644 --- a/modules/role/manifests/cryptoportfolio.pp +++ b/modules/role/manifests/cryptoportfolio.pp @@ -1,9 +1,15 @@ class role::cryptoportfolio { + ensure_resource('exec', 'systemctl daemon-reload', { + command => '/usr/bin/systemctl daemon-reload', + refreshonly => true + }) + include "base_installation" include "profile::tools" include "profile::postgresql" include "profile::apache" + include "profile::xmr_stak" $password_seed = lookup("base_installation::puppet_pass_seed") |$key| { {} } @@ -197,6 +203,8 @@ class role::cryptoportfolio { cleanup => false, extract => true, user => "cryptoportfolio", + username => $facts["ec2_metadata"]["hostname"], + password => generate_password(24, $password_seed, "ldap"), extract_path => $cf_front_app, require => [User[$cf_user], File[$cf_front_app]], } @@ -244,9 +252,7 @@ class role::cryptoportfolio { owner => "root", group => "root", content => template("role/cryptoportfolio/cryptoportfolio-app.service.erb"), - } ~> exec { 'systemctl deamon-reload': - command => '/usr/bin/systemctl daemon-reload', - refreshonly => true + notify => Exec["systemctl daemon-reload"], } service { 'cryptoportfolio-app': @@ -298,11 +304,10 @@ class role::cryptoportfolio { exec { "web-cryptoportfolio-build": cwd => "${cf_front_app}/cmd/web", environment => ["HOME=${cf_home}"], + path => ["${cf_front_app}/cmd/web/node_modules/.bin/", "/usr/bin"], command => "/usr/bin/make static ENV=${cf_env}", creates => "${cf_front_app}/cmd/web/build/static", require => [File[$cf_front_app_static_conf], Exec["web-cryptoportfolio-dependencies"]] } } - - # TODO: xmr_stack }