-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Created example accounts profile and updated Puppetfile to include pu… #6
base: production
Are you sure you want to change the base?
Created example accounts profile and updated Puppetfile to include pu… #6
Conversation
) { | ||
|
||
|
||
create_resources(accounts::user, $accounts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrismatteson gross. You have an aversion to puppet 4 iteration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol, well, besides that I generally assumed our goal was probably to maintain 3.x compatibility for this repo for at least the foreseeable future, since accounts::user is already a define type, this took less code to write.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrismatteson this repo is specifically designed for use with code manager so it has a hard dependency on 4.x+. Iteration is slightly more code but significantly more readable :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So... looking at writing this with loops. I'm not quite sure how I make this work with a hash:
$accounts.each |Hash $account| {
accounts::user { $account:
???
}
}
But will this pass all the parameters correctly? I'm guessing it wouldn't? Mind giving me guidance? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's an example with the host resource.
https://github.com/npwalker/hosts/blob/master/manifests/init.pp
Any parameters that aren't set use default values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems both like a lot more code, and a lot more brittle since this will need to be updated to match any changes to the acceptable parameters.
…ppetlabs/accounts rewrote accounts profile to utilize iteration
…ppetlabs/accounts