Skip to content

Commit

Permalink
env_var hash validation, version: 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
deric committed Nov 18, 2013
1 parent 2b742ec commit 4c6174f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Modulefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name 'puppet-mesos'
version '0.1.0'
version '0.1.1'
source 'http://github.com/deric/puppet-mesos'
author 'Tomas Barton'
license 'Apache License, Version 2.0'
Expand Down
4 changes: 3 additions & 1 deletion manifests/slave.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
$owner = $mesos::owner,
$group = $mesos::group,
$conf_dir = $mesos::conf_dir,
$env_var = undef,
$env_var = {},
) inherits mesos {

validate_hash($env_var)

file { "${conf_dir}/slave.conf":
ensure => 'present',
content => template('mesos/slave.erb'),
Expand Down
4 changes: 2 additions & 2 deletions templates/slave.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CHECKPOINT=<%= @checkpoint %>

# slave environment variables
<% if @env_var %>
<% @env_var.each do |key,val| %>
<% @env_var.each do |key,val| %>
export <%= key %>="<%= val %>"
<% end %>
<% end %>
<% end %>

0 comments on commit 4c6174f

Please sign in to comment.