From a7e8798abf61e5dd434a862c5b1138e925cdb060 Mon Sep 17 00:00:00 2001 From: miguel Date: Tue, 28 Nov 2023 10:27:51 +0000 Subject: [PATCH 1/5] check --- manifests/agent.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/agent.pp b/manifests/agent.pp index 44e287b..f4f9e7b 100644 --- a/manifests/agent.pp +++ b/manifests/agent.pp @@ -1,11 +1,11 @@ -define teamcity::agent ( +class teamcity::agent ( $agent_name = $title, $master_url = undef, $port = '9090', ) { include teamcity::params - Class['teamcity::params'] -> Teamcity::Agent<||> + #Class['teamcity::params'] -> Teamcity::Agent<||> include teamcity::agent::sudo From f44769e5fd1862d88ab0cd9d55597571066e8dce Mon Sep 17 00:00:00 2001 From: miguel Date: Tue, 28 Nov 2023 10:28:59 +0000 Subject: [PATCH 2/5] check --- manifests/params.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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'" + #) } From 88f4511643ed8d45783daf6a043f20761a6a2ff5 Mon Sep 17 00:00:00 2001 From: miguel Date: Tue, 28 Nov 2023 10:33:32 +0000 Subject: [PATCH 3/5] check --- manifests/agent.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/agent.pp b/manifests/agent.pp index f4f9e7b..fe10fe9 100644 --- a/manifests/agent.pp +++ b/manifests/agent.pp @@ -40,7 +40,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}"], From d1bd34155846e29ad78277f93c395b2b443b21ab Mon Sep 17 00:00:00 2001 From: miguel Date: Tue, 28 Nov 2023 14:35:02 +0000 Subject: [PATCH 4/5] fix --- manifests/agent.pp | 2 +- manifests/service_master.pp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/agent.pp b/manifests/agent.pp index fe10fe9..f4cf906 100644 --- a/manifests/agent.pp +++ b/manifests/agent.pp @@ -148,7 +148,7 @@ mode => '0755', } ~> - Exec['systemctl-daemon-reload'] -> +# Exec['systemctl-daemon-reload'] -> service { "teamcity-agent-${agent_name}": ensure => 'running', 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 +} From 808392bc6240e89a13ad022a7dc0fa83a46a51e7 Mon Sep 17 00:00:00 2001 From: miguel Date: Tue, 28 Nov 2023 15:05:45 +0000 Subject: [PATCH 5/5] teamcity-agent --- manifests/agent.pp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/manifests/agent.pp b/manifests/agent.pp index f4cf906..6c80b2a 100644 --- a/manifests/agent.pp +++ b/manifests/agent.pp @@ -4,6 +4,12 @@ $port = '9090', ) { + + $packages = [ "unzip"] + package {$packages: + ensure => present, + } + include teamcity::params #Class['teamcity::params'] -> Teamcity::Agent<||>