Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
# * `$manage_dependencies`
# Boolean to specify whether or not to install the required package dependencies
#
# * `$acme_cron_enable`
# Boolean to specify whether or not to install the cron job on install
#
# Authors
# -------
#
Expand All @@ -41,6 +44,7 @@
String $acme_accountemail = $acme_sh::params::acme_accountemail,
String $acme_version = $acme_sh::params::acme_version,
Boolean $manage_dependencies = $acme_sh::params::manage_dependencies,
Boolean $acme_cron_enable = $acme_sh::params::acme_cron_enable,
) inherits acme_sh::params {

if $manage_dependencies {
Expand All @@ -49,6 +53,12 @@
Package[$dependencies] -> Vcsrepo[$acme_repo_path]
}

if $acme_cron_enable {
$acme_cron = ''
} else {
$acme_cron = '--no-cron'
}

vcsrepo {$acme_repo_path:
ensure => present,
provider => git,
Expand All @@ -58,7 +68,7 @@
}

exec { 'acme_sh::self-install':
command => "/bin/sh ./acme.sh --install --home ${acme_home} --certhome ${acme_certhome} --accountemail \"${acme_accountemail}\"",
command => "/bin/sh ./acme.sh --install ${$acme_cron} --home ${acme_home} --certhome ${acme_certhome} --accountemail \"${acme_accountemail}\"",
path => ['/bin', '/usr/bin'],
cwd => $acme_repo_path,
creates => $acme_home,
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
$acme_accountemail = undef
$acme_version = 'master'
$manage_dependencies = false
$acme_cron_enable = true
}