Skip to content

Commit

Permalink
Make user management optional if user is already managed elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
Hipska committed Mar 10, 2015
1 parent 1c6a1b0 commit 2911fa6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
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 2911fa6

Please sign in to comment.