Skip to content

Commit

Permalink
admin.conf storing path changed to SEDUE_HOME/etc/admin. This change …
Browse files Browse the repository at this point in the history
…resolves name conflict with Sedue instance. fixes #4539
  • Loading branch information
Masahiro Nakagawa committed Jun 24, 2011
1 parent 5d488c5 commit 0286d61
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions manifests/admin_instance.pp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define sedue::admin_instance($user, $instance, $instance_file_content, $config_server) {
define sedue::admin_instance($user, $instance, $admin_conf, $config_server) {
sedue::directory { "sedue::${instance}::admin::directory_log":
user => $user,
instance => $instance,
Expand All @@ -11,13 +11,26 @@
require => Sedue::Directory["sedue::${instance}::admin::directory_log"]
}

file { "sedue::${instance}::admin::instance_file":
path => "${sedue_home}/etc/${instance}.instance",
# 2011/6/23 Masahiro Nakagawa <[email protected]>
# Virtual resource does not work for unique resource across each instances.
# I use 'if !defined' to avoid this problem.
if !defined(File["sedue::admin::conf_directory"]) {
file { "sedue::admin::conf_directory":
path => "${sedue_home}/etc/admin",
owner => $user,
group => $user,
mode => '0755',
ensure => 'directory'
}
}

file { "sedue::${instance}::admin::conf_file":
path => "${sedue_home}/etc/admin/${instance}.conf",
owner => $user,
group => $user,
mode => '0644',
content => $instance_file_content,
require => File["${instance}_serve_directory"]
content => $admin_conf,
require => [File["sedue::admin::conf_directory"], File["${instance}_serve_directory"]]
}

sedue::mongodb { "sedue::${instance}::admin::mongodb":
Expand All @@ -26,6 +39,6 @@
port => $config_server['port'],
pair => $config_server['pair'],
run => $config_server['run'],
require => File["sedue::${instance}::admin::instance_file"]
require => File["sedue::${instance}::admin::conf_file"]
}
}

0 comments on commit 0286d61

Please sign in to comment.