]> git.openstreetmap.org Git - chef.git/commitdiff
tilecache: fix token variable
authorGrant Slater <git@firefishy.com>
Mon, 2 Jan 2017 21:17:46 +0000 (21:17 +0000)
committerGrant Slater <git@firefishy.com>
Mon, 2 Jan 2017 21:17:46 +0000 (21:17 +0000)
cookbooks/tilecache/recipes/default.rb
cookbooks/tilecache/templates/default/nginx_generate_tilecache_qos_map.erb

index f188964796cf4929e6b86e4abfc4b3f8d3d16919..5ba99381d2a5edfa2674664c717b2103bad0a7c7 100644 (file)
@@ -103,7 +103,7 @@ template "/usr/local/bin/nginx_generate_tilecache_qos_map" do
   owner "root"
   group "root"
   mode 0o750
-  variables :web_passwords => web_passwords
+  variables :totp_key => web_passwords["totp_key"]
 end
 
 template "/etc/cron.d/tilecache" do
index e6c17f8a9f5860d8f4ef705a19b0e58597085cd4..16eeb080dd8f1e2146a73ae93166d76ef7f34255 100755 (executable)
@@ -4,7 +4,7 @@
 set -e
 NUM_TOKENS=4 # current + 4
 VALID_TOKEN=3600 # in seconds
-QOS_TOKENS=($(/usr/bin/oathtool --totp --window=${NUM_TOKENS} --time-step-size=${VALID_TOKEN}s <%= web_passwords[:totp_key] %>))
+QOS_TOKENS=($(/usr/bin/oathtool --totp --window=${NUM_TOKENS} --time-step-size=${VALID_TOKEN}s <%= totp_key %>))
 
 # ${qos_tokens[3]/[-1] } = OSM.org exclusive / current
 # ${qos_tokens[2]/[-2] } = tile.openstreetmap.org default