Skip to content

Instantly share code, notes, and snippets.

@garthk
Created March 13, 2013 23:52
Show Gist options
  • Save garthk/5157617 to your computer and use it in GitHub Desktop.
Save garthk/5157617 to your computer and use it in GitHub Desktop.
A Puppet puzzle involving gathered resources and tags.
# I was expecting this to create either /tmp/ab only, or all three files.
# Instead, it creates /tmp/a and /tmp/ab.
# What's going on?
define x() {
file { "/tmp/${name}": ensure => present }
}
@x { 'a': tag => ['a'] }
@x { 'b': tag => ['b'] }
@x { 'ab': tag => ['a', 'b'] }
X <| tag == ['a', 'b'] |>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment