Skip to content

Commit

Permalink
Merge pull request #34 from Super-Visions/feature/optional_user_manag…
Browse files Browse the repository at this point in the history
…ement

Make user management optional if user is already managed elsewhere
  • Loading branch information
Joshua Hoblitt committed Mar 14, 2015
2 parents ba8450a + 183368e commit 1dee44e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,24 @@ class { 'selenium':
The name/uid of the system role account to execute the server process under and
will have ownership of files.

##### `manage_user`

`Boolean` defaults to: `true`

Wether or not this module should manage the system role account to execute the server process under.

##### `group`

`String` defaults to: `selenium`

The group/gid of the system role account and group ownership of files.

##### `manage_group`

`Boolean` defaults to: `true`

Wether or not this module should manage the group of the system role account.

##### `install_root`

`String` defaults to: `/opt/selenium`
Expand Down
15 changes: 11 additions & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#
class selenium(
$user = $selenium::params::user,
$manage_user = $selenium::params::manage_user,
$group = $selenium::params::group,
$manage_group = $selenium::params::manage_group,
$install_root = $selenium::params::install_root,
$java = $selenium::params::java,
$version = $selenium::params::version,
Expand All @@ -25,11 +27,16 @@

include wget

user { $user:
gid => $group,
if $manage_user {
user { $user:
gid => $group,
}
}
group { $group:
ensure => present,

if $manage_group {
group { $group:
ensure => present,
}
}

$jar_name = "selenium-server-standalone-${version}.jar"
Expand Down
2 changes: 2 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
class selenium::params {
$display = ':0'
$user = 'selenium'
$manage_user = true
$group = $user
$manage_group = true
$install_root = '/opt/selenium'
$server_options = '-Dwebdriver.enable.native.events=1'
$hub_options = '-role hub'
Expand Down

0 comments on commit 1dee44e

Please sign in to comment.