Created
December 4, 2012 12:06
-
-
Save chrisboulton/4203133 to your computer and use it in GitHub Desktop.
create_resources_dup_example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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