Skip to content

Commit

Permalink
Merge pull request #8 from tooooots/master
Browse files Browse the repository at this point in the history
Fixed space substitution + changed to match all non-word chars
  • Loading branch information
BIAndrews authored Oct 25, 2016
2 parents 468b9ae + c677575 commit e4a109c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This turns EC2 instance tags into puppet facts. For example: `ec2_tag_*tagname*`

### What ec2tagfacts affects

* Tag names are prepended with `ec2_tag_`, converted to all lowercase, and spaces are converted to underscores.
* Tag names are prepended with `ec2_tag_`, converted to all lowercase, and non-word character are converted to underscores.
* You can now use EC2 tags in puppet classes, for example `$::ec2_tag_name`.
* EC2 tags are then added to facter.
* Python pip is installed in order to install the aws cli tool with pip.
Expand Down
2 changes: 1 addition & 1 deletion lib/facter/ec2_tag_facts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

fact = "ec2_tag_#{child['Key']}"
fact.downcase!
fact.gsub(/\s+/, "_")
fact.gsub!(/\W+/, "_")
#puts "Setting fact #{fact} to #{child['Value']}"

Facter.add("#{fact}") do
Expand Down

0 comments on commit e4a109c

Please sign in to comment.