Skip to content

Commit

Permalink
Merge branch 'release/0.3.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
heliocentric committed Jul 11, 2017
2 parents c317629 + 026ff37 commit a21bc9e
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* Tue Jul 11 2017 Dylan Cochran <[email protected]> - 0.3.2
- (SIMP-3407) Fix idempoency on acl token generation
- (SIMP-3403) Spurious 'undefined method unpack'

* Mon Jul 10 2017 Dylan Cochran <[email protected]> - 0.3.1
- (SIMP-3360) Use module data for certificate paths
- (SIMP-3087) Add libkv::lookup hierav5 backend function
Expand Down
16 changes: 14 additions & 2 deletions files/consul/consul-create-acl
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
#!/bin/sh
TOKEN=$(cat $1)
OUTPUTFILE=$2
# Give consul some time to attempt a join, then realize it's bootstrapping
# a new cluster
sleep 10

while getopts ":t:" o; do
case "${o}" in
t)
TYPE=${OPTARG}
;;
esac
done

shift $((OPTIND-1))
TOKEN=$(cat $1)
OUTPUTFILE=$2

if [ "${TYPE}" = "" ] ; then
TYPE="libkv"
fi

case "${TYPE}" in
libkv)
POLICY='{
Expand Down
6 changes: 5 additions & 1 deletion lib/puppet_x/libkv/consul_provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,11 @@ def atomic_list(params)
value.each do |entry|
nkey = entry["Key"].gsub(reg,"")
retval[nkey] = entry
retval[nkey]["value"] = Base64.decode64(entry["Value"])
unless (entry["Value"] == nil)
retval[nkey]["value"] = Base64.decode64(entry["Value"])
else
retval[nkey]["value"] = nil
end
retval[nkey].delete("Value")
retval[nkey].delete("Key")
end
Expand Down
5 changes: 4 additions & 1 deletion manifests/consul.pp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
],
}
exec { "/usr/bin/consul-create-acl -t agent_token /etc/simp/bootstrap/consul/master_token /etc/simp/bootstrap/consul/agent_token":
creates => "/etc/simp/bootstrap/consul/libkv_token",
creates => "/etc/simp/bootstrap/consul/agent_token",
require => [
Service['consul'],
File["/usr/bin/consul-create-acl"],
Expand Down Expand Up @@ -183,4 +183,7 @@
config_hash => $merged_hash,
version => $version,
}
file { "/usr/bin/consul":
target => "/usr/local/bin/consul",
}
}
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simp-libkv",
"version": "0.3.1",
"version": "0.3.2",
"author": "simp",
"summary": "",
"license": "Apache-2.0",
Expand Down

0 comments on commit a21bc9e

Please sign in to comment.