Skip to content

Instantly share code, notes, and snippets.

@chrisboulton
Created December 4, 2012 12:06
Show Gist options
  • Select an option

  • Save chrisboulton/4203133 to your computer and use it in GitHub Desktop.

Select an option

Save chrisboulton/4203133 to your computer and use it in GitHub Desktop.
create_resources_dup_example
define my_user($username, $group) {
user { $username: ensure => present, }
# This will trigger a duplicate definition error when compiling the catalog
group { $group: ensure => present, }
}
$users = {
'chris' => {
'username' => 'chris',
'group' => 'my-group',
},
'another_user' => {
'username' => 'another_user',
'group' => 'my-group',
},
}
create_resources('my_user', $users)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment