Skip to content

Commit

Permalink
Merge pull request #31 from kreczko/a-few-small-changes
Browse files Browse the repository at this point in the history
A few small changes
  • Loading branch information
kreczko committed Sep 22, 2014
2 parents f4e1daa + 3f09c71 commit 06c09a5
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 14 deletions.
48 changes: 34 additions & 14 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
$group_autoregroup = true,
$health_check_script = "puppet:///modules/${module_name}/healhcheck_wn_condor",
$include_username_in_accounting = false,
$use_pkg_condor_config = false,
$is_ce = false,
$is_manager = false,
$is_worker = false,
Expand All @@ -131,6 +132,7 @@
$leave_job_in_queue = undef,
$ganglia_cluster_name = false,
$uid_domain = 'example.com',
$pool_create = true,
$default_domain_name = $uid_domain,
$filesystem_domain = $uid_domain,
$use_accounting_groups = false,
Expand Down Expand Up @@ -166,11 +168,18 @@

# default daemon, runs everywhere
$default_daemon_list = ['MASTER']
$common_config_files = [
File['/etc/condor/condor_config'],
File['/etc/condor/condor_config.local'],
File['/etc/condor/config.d/10_security.config'],
]
if $use_pkg_condor_config {
$common_config_files = [
File['/etc/condor/condor_config.local'],
File['/etc/condor/config.d/10_security.config'],
]
} else {
$common_config_files = [
File['/etc/condor/condor_config'],
File['/etc/condor/condor_config.local'],
File['/etc/condor/config.d/10_security.config'],
]
}

if $is_ce and $is_manager {
# machine is both CE and manager (for small sites)
Expand Down Expand Up @@ -240,13 +249,15 @@
}

# files common between machines
file { '/etc/condor/condor_config':
backup => ".bak.${now}",
source => "puppet:///modules/${module_name}/condor_config",
require => Package['condor'],
owner => $condor_user,
group => $condor_group,
mode => 644,
unless $use_pkg_condor_config {
file { '/etc/condor/condor_config':
backup => ".bak.${now}",
source => "puppet:///modules/${module_name}/condor_config",
require => Package['condor'],
owner => $condor_user,
group => $condor_group,
mode => 644,
}
}

file { '/etc/condor/condor_config.local':
Expand All @@ -266,10 +277,19 @@
mode => 644,
}

file { ["${pool_home}", "${pool_home}/condor", "/etc/condor/persistent"]:
if $pool_create {
$condor_directories = [
"${pool_home}",
"${pool_home}/condor",
"/etc/condor/persistent"]
} else {
$condor_directories = ["/etc/condor/persistent"]
}

file { $condor_directories:
ensure => directory,
owner => 'condor',
mode => 644,
mode => 644,
}

if $use_kerberos_security {
Expand Down
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
$group_autoregroup = true,
$health_check_script = "puppet:///modules/${module_name}/healhcheck_wn_condor",
$include_username_in_accounting = false,
$use_pkg_condor_config = false,
$install_repositories = true,
$dev_repositories = false,
$is_ce = false,
Expand All @@ -145,6 +146,7 @@
$use_kerberos_security = false,
$certificate_mapfile = "puppet:///modules/${module_name}/certificate_mapfile",
$pool_home = '/pool',
$pool_create = true,
$queues = hiera('grid_queues', undef),
$periodic_expr_interval = 60,
$max_periodic_expr_interval = 1200,
Expand Down Expand Up @@ -205,6 +207,7 @@
group_autoregroup => $group_autoregroup,
health_check_script => $health_check_script,
include_username_in_accounting => $include_username_in_accounting,
use_pkg_condor_config => $use_pkg_condor_config,
is_ce => $is_ce,
is_manager => $is_manager,
is_worker => $is_worker,
Expand All @@ -223,6 +226,7 @@
leave_job_in_queue => $leave_job_in_queue,
ganglia_cluster_name => $ganglia_cluster_name,
pool_password => $pool_password,
pool_create => $pool_create,
uid_domain => $uid_domain,
default_domain_name => $default_domain_name,
filesystem_domain => $filesystem_domain,
Expand Down

0 comments on commit 06c09a5

Please sign in to comment.