Skip to content

Commit

Permalink
Merge pull request #8 from keirans/resolve_colon_issue
Browse files Browse the repository at this point in the history
Addressing issue where colon in a tag value will cause a failure to return fact data
  • Loading branch information
keirans authored Mar 3, 2018
2 parents 689e35d + 56d59d7 commit d1aac83
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ Puppetfile entries
# Directly from Git
mod 'azuremetadata',
:git => 'https://github.com/keirans/azuremetadata.git',
:tag => '0.1.3'
:tag => '0.1.4'


# Directly from the forge
mod 'keirans-azuremetadata', '0.1.3'
mod 'keirans-azuremetadata', '0.1.4'


Role / Profile inclusion
Expand Down
2 changes: 1 addition & 1 deletion lib/facter/azure_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
confine virtual: 'hyperv'
setcode do
tags = metadata['compute']['tags'].split(';')
metadata['compute']['tags'] = Hash[tags.map { |tag| tag.split(':') }]
metadata['compute']['tags'] = Hash[tags.map { |tag| tag.split(':', 2) }]
metadata
end
end
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "keirans-azuremetadata",
"version": "0.1.3",
"version": "0.1.4",
"author": "keirans",
"summary": "This Puppet module exposes the Azure instance metadata as facts",
"license": "Apache-2.0",
Expand Down

0 comments on commit d1aac83

Please sign in to comment.