Skip to content
This repository was archived by the owner on Nov 17, 2022. It is now read-only.

Commit

Permalink
Merge pull request #14 from alexfalkowski/arf/fix-user
Browse files Browse the repository at this point in the history
Arf/fix user
  • Loading branch information
alexfalkowski committed Nov 15, 2014
2 parents c5a9a32 + 1ad2ec2 commit 3b214e7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BOXES = [
'teamcity' => {
'password' => '$1$ByY03mDX$4pk9wp9bC19yB6pxSoVB81',
'server' => {
'backup' => 'file:///vagrant/tmp/TeamCity_Backup_20141106_054341.zip',
'backup' => 'file:///vagrant/tmp/TeamCity_Backup_20141113_135501.zip',
'database' => {
'username' => 'postgres',
'password' => '3175bce1d3201d16594cebf9d7eb3f9d',
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
license 'Apache 2.0'
description 'Installs/Configures TeamCity agent/server.'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.5.0'
version '0.6.0'
recipe 'chef-teamcity::server', 'Install a TeamCity server'
recipe 'chef-teamcity::agent', 'Installs a TeamCity agent'

Expand Down
3 changes: 3 additions & 0 deletions recipes/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
TEAMCITY_PASSWORD = node['teamcity']['password'].freeze
TEAMCITY_SERVICE_NAME = node['teamcity']['service_name'].freeze
TEAMCITY_GROUP = node['teamcity']['group'].freeze
TEAMCITY_HOME_PATH = "/home/#{TEAMCITY_USERNAME}".freeze
TEAMCITY_PATH = "/opt/TeamCity-#{TEAMCITY_VERSION}".freeze
TEAMCITY_SRC_PATH = "#{TEAMCITY_PATH}.zip".freeze
TEAMCITY_INIT_LOCATION = "/etc/init.d/#{TEAMCITY_SERVICE_NAME}".freeze
Expand All @@ -41,6 +42,8 @@
group TEAMCITY_GROUP

user TEAMCITY_USERNAME do
supports manage_home: true
home TEAMCITY_HOME_PATH
gid TEAMCITY_GROUP
shell '/bin/bash'
password TEAMCITY_PASSWORD
Expand Down
6 changes: 4 additions & 2 deletions recipes/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
TEAMCITY_PASSWORD = node['teamcity']['password'].freeze
TEAMCITY_SERVICE_NAME = node['teamcity']['service_name'].freeze
TEAMCITY_GROUP = node['teamcity']['group'].freeze
TEAMCITY_HOME_PATH = "/home/#{TEAMCITY_USERNAME}".freeze
TEAMCITY_PATH = "/opt/TeamCity-#{TEAMCITY_VERSION}".freeze
TEAMCITY_SRC_PATH = "#{TEAMCITY_PATH}.tar.gz".freeze
TEAMCITY_INIT_LOCATION = "/etc/init.d/#{TEAMCITY_SERVICE_NAME}".freeze
Expand All @@ -48,6 +49,8 @@
group TEAMCITY_GROUP

user TEAMCITY_USERNAME do
supports manage_home: true
home TEAMCITY_HOME_PATH
gid TEAMCITY_GROUP
shell '/bin/bash'
password TEAMCITY_PASSWORD
Expand Down Expand Up @@ -100,8 +103,7 @@
processed_backup_file = File.basename(backup_file, '.*').freeze
backup_path = ::File.join(TEAMCITY_BACKUP_PATH, backup_file).freeze
processed_backup_path = ::File.join(TEAMCITY_BACKUP_PATH, processed_backup_file).freeze
home_path = "/home/#{TEAMCITY_USERNAME}".freeze
home_database_props = ::File.join(home_path, TEAMCITY_DATABASE_PROPS_NAME).freeze
home_database_props = ::File.join(TEAMCITY_HOME_PATH, TEAMCITY_DATABASE_PROPS_NAME).freeze

remote_file backup_path do
source TEAMCITY_BACKUP_FILE
Expand Down

0 comments on commit 3b214e7

Please sign in to comment.