-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
admin.conf storing path changed to SEDUE_HOME/etc/admin. This change …
…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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
|
@@ -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": | ||
|
@@ -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"] | ||
} | ||
} |