Skip to content
Open
Show file tree
Hide file tree
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
15 changes: 11 additions & 4 deletions manifests/agent.pp
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
define teamcity::agent (
class teamcity::agent (
$agent_name = $title,
$master_url = undef,
$port = '9090',
) {


$packages = [ "unzip"]
package {$packages:
ensure => present,
}

include teamcity::params
Class['teamcity::params'] -> Teamcity::Agent<||>
#Class['teamcity::params'] -> Teamcity::Agent<||>

include teamcity::agent::sudo

Expand Down Expand Up @@ -40,7 +46,8 @@
$use_download_url = regsubst($download_url, '%%%TC_MASTER%%%', $use_master_url)
$use_agent_path = "${tc_agent_path}_${agent_name}"

mkdir::p { $use_agent_path :
file { $use_agent_path:
ensure => directory,
owner => 'teamcity',
group => 'teamcity',
before => Archive["teamcity-agent-${agent_name}"],
Expand Down Expand Up @@ -147,7 +154,7 @@
mode => '0755',
} ~>

Exec['systemctl-daemon-reload'] ->
# Exec['systemctl-daemon-reload'] ->

service { "teamcity-agent-${agent_name}":
ensure => 'running',
Expand Down
12 changes: 6 additions & 6 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@

) {

validate_re($authentication, '^(local|ldap)$',
"profiles::teamcity_master::authentication must be one of 'local' or 'ldap'"
)
#validate_re($authentication, '^(local|ldap)$',
# "profiles::teamcity_master::authentication must be one of 'local' or 'ldap'"
#)

if $authentication == 'ldap' and $ldap_configuration == undef {
fail('profiles::teamcity_master: if authentication is LDAP you have to provide $ldap_configuration')
}

validate_re($archive_provider, '^(camptocamp|puppet)$',
"teamcity::params::archive_provider must be one of 'camptocamp'/'puppet'"
)
#validate_re($archive_provider, '^(camptocamp|puppet)$',
# "teamcity::params::archive_provider must be one of 'camptocamp'/'puppet'"
#)

}
4 changes: 2 additions & 2 deletions manifests/service_master.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
mode => '0755',
} ~>

Exec['systemctl-daemon-reload'] ->
# Exec['systemctl-daemon-reload'] ->

service { 'teamcity':
ensure => 'running',
enable => true,
}

}
}