Skip to content

Commit

Permalink
Merge pull request voxpupuli#547 from jhoblitt/maint/simplify_slave_l…
Browse files Browse the repository at this point in the history
…ogic

simplify ::jenkins::slave ordering logic
  • Loading branch information
jhoblitt committed Apr 3, 2016
2 parents 3954940 + 584b942 commit ec9257f
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions manifests/slave.pp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
# Currently the puppetlabs/java module doesn't support installing Java on
# Darwin
include ::java
Class['java'] -> Service['jenkins-slave']
}

# customizations based on the OS family
Expand Down Expand Up @@ -202,12 +203,14 @@
mode => '0644',
owner => 'root',
group => 'wheel',
}
} ->
Service['jenkins-slave']

file { '/var/log/jenkins':
ensure => 'directory',
owner => $slave_user,
}
} ->
Service['jenkins-slave']

if $manage_slave_user {
# osx doesn't have managehome support, so create directory
Expand All @@ -218,10 +221,6 @@
require => User['jenkins-slave_user'],
}
}

File['/var/log/jenkins'] ->
File['/Library/LaunchDaemons/org.jenkins-ci.slave.jnlp.plist'] ->
Service['jenkins-slave']
}
default: { }
}
Expand Down Expand Up @@ -255,7 +254,8 @@
proxy_server => $::jenkins::proxy_server,
cleanup => false,
extract => false,
}
} ->
Service['jenkins-slave']
}

service { 'jenkins-slave':
Expand All @@ -266,17 +266,8 @@
hasrestart => true,
}

if ($manage_client_jar) {
Archive['get_swarm_client'] ->
Service['jenkins-slave']
}
if $manage_slave_user and $manage_client_jar {
User['jenkins-slave_user']->
Archive['get_swarm_client']
}

if $install_java and ($::osfamily != 'Darwin') {
Class['java'] ->
Service['jenkins-slave']
}
}

0 comments on commit ec9257f

Please sign in to comment.