From 78db384ff88ef25ead576ba87508b60c0572ce09 Mon Sep 17 00:00:00 2001 From: Steve Lacey Date: Mon, 2 Jun 2014 10:06:25 +0100 Subject: [PATCH] Allow custom API urls. --- manifests/init.pp | 8 +++++--- templates/raxrc.erb | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index d6b4bec..6bb5a7d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,9 +1,9 @@ # == Class: cloudmonitoring # # Install, configure, and launch the Rackspace Cloud Monitoring Agent -# Assumes you already have configured and know an agent token +# Assumes you already have configured and know an agent token # See http://www.rackspace.com/knowledge_center/article/install-the-cloud-monitoring-agent#Setup -# +# # === Parameters # # [*monitoring_token*] @@ -11,7 +11,7 @@ # see http://docs.rackspace.com/cm/api/v1.0/cm-devguide/content/service-agent-tokens.html # # === Authors -# +# # Victor Watkins # @@ -20,6 +20,8 @@ $monitoring_token = undef, $username = undef, $apikey = undef, + $api_url = "https://monitoring.api.rackspacecloud.com/v1.0", + $auth_api_url = "https://identity.api.rackspacecloud.com/v2.0" ) { if $monitoring_token != undef { diff --git a/templates/raxrc.erb b/templates/raxrc.erb index 4567d67..fac3d34 100644 --- a/templates/raxrc.erb +++ b/templates/raxrc.erb @@ -5,10 +5,10 @@ username=<%= scope.lookupvar('cloudmonitoring::username') %> api_key=<%= scope.lookupvar('cloudmonitoring::apikey') %> [api] -url=https://monitoring.api.rackspacecloud.com/v1.0 +url=<%= scope.lookupvar('cloudmonitoring::api_url') %> [auth_api] -url=https://identity.api.rackspacecloud.com/v2.0 +url=<%= scope.lookupvar('cloudmonitoring::auth_api_url') %> [ssl] -verify=true \ No newline at end of file +verify=true