diff --git a/manifests/agent.pp b/manifests/agent.pp index 44e287b..6c80b2a 100644 --- a/manifests/agent.pp +++ b/manifests/agent.pp @@ -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 @@ -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}"], @@ -147,7 +154,7 @@ mode => '0755', } ~> - Exec['systemctl-daemon-reload'] -> +# Exec['systemctl-daemon-reload'] -> service { "teamcity-agent-${agent_name}": ensure => 'running', diff --git a/manifests/params.pp b/manifests/params.pp index fb76a55..ad4e24d 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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'" + #) } diff --git a/manifests/service_master.pp b/manifests/service_master.pp index 4096c78..2f16610 100644 --- a/manifests/service_master.pp +++ b/manifests/service_master.pp @@ -14,11 +14,11 @@ mode => '0755', } ~> - Exec['systemctl-daemon-reload'] -> +# Exec['systemctl-daemon-reload'] -> service { 'teamcity': ensure => 'running', enable => true, } -} \ No newline at end of file +}