| using defined types in foreman to create instance | Vlados | 2/13/13 9:29 AM | Please help. For example: How i can pass parameters to defined puppet type apache::vhost and create instance from foreman : # Definition: apache::vhost With regards, Vladislav. |
| Re: [foreman-users] using defined types in foreman to create instance | Dominic Cleal | 2/13/13 9:31 AM | On 13/02/13 17:29, Vlados Vlados wrote:> How i can pass parameters to defined puppet type *apache::vhost *and > create instance from foreman : You can't instantiate resources (defined types, or native) over the Puppet ENC interface. Maybe use create_resources instead, e.g. define foo($a, $b) { notify { "$title: got $a and $b": } } class createfoo($data){ create_resources(foo, $data) } Then in foreman for the createfoo class, set the data parameter to: --- data: first: a: "param 1a" b: "param 1b" second: a: "param 2a" b: "param 2b" -- Dominic Cleal Red Hat Engineering |
| Re: [foreman-users] using defined types in foreman to create instance | Corey Osman | 2/13/13 9:34 AM | Use hiera or foreman to fill in all those variables. You could auto populate with defined types and puppet 3 and foreman to. -- |
| Re: [foreman-users] using defined types in foreman to create instance | Vlados | 2/13/13 9:35 AM | Cool, thank you! среда, 13 февраля 2013 г., 21:31:32 UTC+4 пользователь Dominic Cleal написал: |
| Re: using defined types in foreman to create instance | James James | 3/13/14 1:58 AM | Hi Vlados, Can you show me how you solve your problem ? I a facing the same issue but I don't know how to set the varibles in foreman. Regards. |
| Re: using defined types in foreman to create instance | Damien Mathieu | 5/12/14 5:20 AM | Hi Everybody solve the problem ? I kknow is very old, but i have the same problem today thx |
| Re: [foreman-users] Re: using defined types in foreman to create instance | James James | 7/16/14 1:59 PM | Hi, I have solved my problem so can you explain me yours ?
|
| Re: [foreman-users] Re: using defined types in foreman to create instance | soumen trivedi | 11/11/14 3:44 AM | I have created a puppet module (https://github.com/soumentrivedi/foreman_resources) to achieve this. I have imported this module into my Foreman instance, performed the required setup for Puppet Future Parser (mentioned in the Readme of the module) and tested this Puppetlabs postgresql module. All looks ok and works fine. I have given a sample yaml example as well for how to pass values. I am sure there might be many more slicker ways in achieving this, the current solution works for us perfectly fine. Feedback on the module is always welcome. :) |