Skip to content

Commit

Permalink
Rename $service_flannel_ensure to $docker_dropin_ensure
Browse files Browse the repository at this point in the history
  • Loading branch information
cristifalcas committed Dec 7, 2015
1 parent c474aef commit 156c8e7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
6 changes: 3 additions & 3 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
}

if $flannel::manage_docker {
$service_flannel_ensure = 'file'
$docker_dropin_ensure = 'file'
include ::docker
File['/usr/lib/systemd/system/docker.service.d/flannel.conf'] ~> Service['flanneld'] ~> Service['docker']
} else {
$service_flannel_ensure = 'absent'
$docker_dropin_ensure = 'absent'
}

file { '/usr/lib/systemd/system/docker.service.d/flannel.conf':
ensure => $service_flannel_ensure,
ensure => $docker_dropin_ensure,
content => template("${module_name}/service_flannel.conf"),
mode => '0644',
} ~>
Expand Down
10 changes: 5 additions & 5 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
$manage_docker = true
$alsologtostderr = false
$public_ip = undef
$etcd_endpoints = 'http://127.0.0.1:4001'
$etcd_prefix = '/coreos.com/network'
$etcd_keyfile = undef
$etcd_certfile = undef
$etcd_cafile = undef
$iface = undef
$subnet_dir = '/run/flannel/networks'
$subnet_file = '/run/flannel/subnet.env'
Expand All @@ -24,6 +19,11 @@
$remote_cafile = undef
$networks = undef

$etcd_endpoints = 'http://127.0.0.1:4001'
$etcd_prefix = '/coreos.com/network'
$etcd_keyfile = undef
$etcd_certfile = undef
$etcd_cafile = undef
$configure_etcd = false
$network = '10.0.0.0/8'
$subnetlen = undef
Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cristifalcas-flannel",
"version": "0.10.0",
"version": "1.0.0",
"author": "Cristian Falcas",
"license": "Apache-2.0",
"project_page": "https://github.com/cristifalcas/puppet-flannel",
Expand Down Expand Up @@ -35,7 +35,7 @@
"requirements": [],
"dependencies": [{
"name": "cristifalcas/etcd",
"version_requirement": "0.x"
"version_requirement": "1.x"
},{
"name": "cristifalcas/docker",
"version_requirement": "5.x"
Expand Down
15 changes: 8 additions & 7 deletions templates/etcd_network_definition.erb
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
{
"Network": "<%= scope['flannel::network'] %>"<% -%>
<% if @subnetlen then -%>,
"SubnetLen": <%= scope['flannel::subnetlen'] %>
"SubnetLen": <%= scope['flannel::subnetlen'] -%>
<% end -%>
<% if @subnetmin then -%>,
"SubnetMin": "<%= scope['flannel::subnetmin'] %>"
"SubnetMin": "<%= scope['flannel::subnetmin'] %>"<% -%>
<% end -%>
<% if @subnetmax then -%>,
"SubnetMax": "<%= scope['flannel::subnetmax'] %>"
"SubnetMax": "<%= scope['flannel::subnetmax'] %>"<% -%>
<% end -%>
<% if @backend_type && @backend_port then -%>,
"Backend": {
"Type": "<%= scope['flannel::backend_type'] %>"
"Type": "<%= scope['flannel::backend_type'] %>"<% -%>
<% if @backend_type == 'udp' then -%>,
"Port": <%= scope['flannel::backend_port'] %>
"Port": <%= scope['flannel::backend_port'] -%>
<% elsif @backend_type == 'vxlan' -%>,
"VNI": <%= scope['flannel::backend_port'] %>
"VNI": <%= scope['flannel::backend_port'] -%>
<% elsif @backend_type == 'aws-vpc' -%>,
"RouteTableID": <%= scope['flannel::backend_port'] %>
"RouteTableID": <%= scope['flannel::backend_port'] -%>
<% end -%>

}
<% end -%>
}

0 comments on commit 156c8e7

Please sign in to comment.