Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Commit

Permalink
Merge pull request oswaldlabs#17 from giorgio-v/chef-tags
Browse files Browse the repository at this point in the history
Tags from node
  • Loading branch information
Brian Scott committed Aug 17, 2013
2 parents ecf4833 + d83373b commit c133341
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/chef-rundeck.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#
# Copyright 2010, Opscode, Inc.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -47,14 +47,14 @@ def configure
#++
os_family = node[:kernel][:os] =~ /windows/i ? 'windows' : 'unix'
response << <<-EOH
<node name="#{xml_escape(node[:fqdn])}"
type="Node"
<node name="#{xml_escape(node[:fqdn])}"
type="Node"
description="#{xml_escape(node.name)}"
osArch="#{xml_escape(node[:kernel][:machine])}"
osFamily="#{xml_escape(os_family)}"
osName="#{xml_escape(node[:platform])}"
osVersion="#{xml_escape(node[:platform_version])}"
tags="#{xml_escape([node.chef_environment, node.run_list.roles.join(',')].join(','))}"
tags="#{xml_escape([node.chef_environment, node[:tags].join(','), node.run_list.roles.join(',')].join(','))}"
username="#{xml_escape(ChefRundeck.username)}"
hostname="#{xml_escape(node[:fqdn])}"
editUrl="#{xml_escape(ChefRundeck.web_ui_url)}/nodes/#{xml_escape(node.name)}/edit"/>
Expand All @@ -64,4 +64,3 @@ def configure
response
end
end

0 comments on commit c133341

Please sign in to comment.