Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[config] conflict container variable name #8

Merged
merged 1 commit into from
Aug 27, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions config/tasks/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,17 +220,17 @@ def config_nagios(container)
def config_hatohol(container)
end

def config_redmine(container_name, container)
def config_redmine(container_name, container_config)

# Config /var/lib/redmine/config/database.yml
database_config_path = File.join(container['container_path'],'rootfs/var/lib/redmine/config/database.yml')
database_config_path = File.join(container_config['container_path'],'rootfs/var/lib/redmine/config/database.yml')
database_config_example_path = database_config_path + '.example'

database_config = YAML::load_file(database_config_example_path)

database_config['production']['database'] = container['redmine']['database_name']
database_config['production']['username'] = container['redmine']['database_username']
database_config['production']['password'] = container['redmine']['database_password']
database_config['production']['database'] = container_config['redmine']['database_name']
database_config['production']['username'] = container_config['redmine']['database_username']
database_config['production']['password'] = container_config['redmine']['database_password']

open(database_config_path,'w') do |file|
YAML::dump(database_config,file)
Expand All @@ -248,7 +248,7 @@ def config_redmine(container_name, container)
end

puts "Redmine Internal Setting Start"
tmp_path = File.join(container['container_path'], 'rootfs/tmp')
tmp_path = File.join(container_config['container_path'], 'rootfs/tmp')
FileUtils.copy('assets/redmine_setup.sh', tmp_path)

container.attach do
Expand Down