Skip to content

Commit

Permalink
Merge pull request tubemogul#56 from ynnt/master
Browse files Browse the repository at this point in the history
Add manage_user parameter
  • Loading branch information
Oleg Galitskiy committed Oct 5, 2017
2 parents b87f20a + d1d8cf0 commit 3de83af
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 1 addition & 3 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@
#
class aptly::install {

if ! defined(User[$aptly::user]) {
if $aptly::manage_user {
user { $aptly::user:
ensure => present,
uid => $aptly::uid,
gid => $aptly::group,
shell => '/bin/bash',
require => Group[$aptly::group],
}
}

if ! defined(Group[$aptly::group]) {
group { $aptly::group:
ensure => present,
gid => $aptly::gid,
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 3de83af

Please sign in to comment.