95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
# File 'manifests/init.pp', line 95
class weave (
$docker_host_weave_ip = $weave::params::docker_host_weave_ip,
$docker_cluster_peers = $weave::params::docker_cluster_peers,
$docker = $weave::params::docker,
$weave = $weave::params::weave,
$weave_container = $weave::params::weave_container,
$weave_image = $weave::params::weave_image,
$weave_image_tag = $weave::params::weave_image_tag,
$weave_manage_firewall = $weave::params::weave_manage_firewall,
) inherits weave::params {
include stdlib
# include firewall
# include docker
validate_absolute_path( $weave )
validate_absolute_path( $docker )
validate_string( $weave_image )
validate_string( $weave_image_tag )
validate_string( $weave_conatiner )
validate_bool( is_ip_address( $docker_host_weave_ip ) )
# for $docker_cluster_peer in $docker_cluster_peers
# validate_bool( is_ip_address( $docker_cluster_peer) )
# notify { 'running weave::init': }
anchor { 'weave::begin': } ->
class { 'weave::install_docker': } ->
class { 'weave::install_weave': } ->
weave::launch { "$docker_host_weave_ip":
docker_host_weave_ip => $docker_host_weave_ip,
docker_cluster_peers => $docker_cluster_peers,
weave_manage_firewall => $weave_manage_firewall,
} ~>
anchor { 'weave::end': }
}
|