diff --git a/README.md b/README.md index 2880eb1..96b9d98 100644 --- a/README.md +++ b/README.md @@ -377,6 +377,11 @@ Path of the configuration file to be used by the aptly service. Default: `/etc/aptly.conf` +##### `manage_user` +Whethere should this module manage aptly user or not + +Default: `true` + ##### `user` OS user which will run the service. diff --git a/manifests/init.pp b/manifests/init.pp index ec3a04c..87d7a55 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -14,6 +14,7 @@ $port = $aptly::params::port, $bind = $aptly::params::bind, $config_filepath = $aptly::params::config_filepath, + $manage_user = $aptly::params::manage_user, $user = $aptly::params::user, $uid = $aptly::params::uid, $group = $aptly::params::group, diff --git a/manifests/install.pp b/manifests/install.pp index 7de799c..d3d2c71 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -4,7 +4,7 @@ # class aptly::install { - if ! defined(User[$aptly::user]) { + if $aptly::manage_user { user { $aptly::user: ensure => present, uid => $aptly::uid, @@ -12,9 +12,7 @@ shell => '/bin/bash', require => Group[$aptly::group], } - } - if ! defined(Group[$aptly::group]) { group { $aptly::group: ensure => present, gid => $aptly::gid, diff --git a/manifests/params.pp b/manifests/params.pp index 2373e16..8717831 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -15,6 +15,7 @@ $port = '8080' $bind = '0.0.0.0' $config_filepath = '/etc/aptly.conf' + $manage_user = true $user = 'aptly' $uid = 450 $group = 'aptly'