I tried to use this module in my puppet code. Since java installation is not included, I need to add dependency on my java module when using this teamcity module in my code. However, puppet would not respect to the dependency I added in code:
class profile::my_teamcity_agent {
include ::my_java
class { '::teamcity':
agent_user => 'root',
agent_group => 'root',
server_url => 'http://test.server:8111',
agent_dir => '/opt/buildAgent',
require => Class['::my_java'],
}
}
With this code, I did puppet apply --graph. It actually shows that java and teamcity::agent modules are on the same level in execution pipeline, which means there is no dependency between these two modules. As a result, my teamcity profile would fail when puppet tried to start teamcity service before java being installed.
After some investigation, the problem is caused by include ::teamcity::agent in class teamcity. As indicated by puppet document ([https://docs.puppet.com/puppet/latest/reference/lang_containment.html#the-contain-function]), include would not really ensure the execution dependencies. For puppet > 3.4.0, it should use contain. And for puppet <= 3.4.0, it should use anchor pattern.
Hi,
I tried to use this module in my puppet code. Since java installation is not included, I need to add dependency on my java module when using this teamcity module in my code. However, puppet would not respect to the dependency I added in code:
With this code, I did
puppet apply --graph
. It actually shows that java and teamcity::agent modules are on the same level in execution pipeline, which means there is no dependency between these two modules. As a result, my teamcity profile would fail when puppet tried to start teamcity service before java being installed.After some investigation, the problem is caused by
include ::teamcity::agent
inclass teamcity
. As indicated by puppet document ([https://docs.puppet.com/puppet/latest/reference/lang_containment.html#the-contain-function]),include
would not really ensure the execution dependencies. For puppet > 3.4.0, it should usecontain
. And for puppet <= 3.4.0, it should use anchor pattern.I will submit a PR shortly to address this issue.
Thanks,
Alex