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| { {} }
target => $cf_front_app,
before => File[$cf_front_app],
} ~>
- exec { "remove old directory":
+ exec { "remove old ${cf_front_app} directory":
refreshonly => true,
user => $cf_user,
command => "/usr/bin/rm -rf ${cf_front_app}",
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':
File["/etc/systemd/system/cryptoportfolio-app.service"],
Postgresql::Server::Db[$cf_pg_db]
],
+ } ~>
+ exec { "dump $cf_pg_db structure":
+ refreshonly => true,
+ user => $::profile::postgresql::pg_user,
+ group => $::profile::postgresql::pg_user,
+ command => "/usr/bin/pg_dump --schema-only --clean --no-publications $cf_pg_db > /var/lib/postgres/${cf_pg_db}.schema",
}
file { $cf_front_app_api_conf:
require => [File[$cf_front_app_static_conf], Exec["web-cryptoportfolio-dependencies"]]
}
}
-
- # TODO: xmr_stack
}