Hi Robroy, tl;dr: I suggest making a new broker in /etc/puppetlabs/razor-server/brokers. Details about why are below.
The approach you took has the right idea, and there are a few different ways in Razor to achieve the desired outcome. The key question is whether the file creation (in the sample case you described) is more a part of the installer (you wouldn't want to install the OS without the file being created) [this would be a new Task], or a part of the code that runs after, say, various OSes complete installation [this would be a new Broker]. My impression is that it probably makes more sense to do this in a broker, since it's code that runs after the installation is complete. Take a look at some of the brokers we have listed here: https://github.com/puppetlabs/razor-server/blob/master/brokers In particular, the `noop` broker is a good starting point. All this broker does is report back to the server that the install is done: https://github.com/puppetlabs/razor-server/blob/master/brokers/noop.broker/install.erb Brokers in general are just code that triggers something to happen after the actual OS installation is complete. The `noop` broker-type does nothing, the `puppet` broker-type installs FOSS puppet, the `puppet-pe` broker-type installs PE puppet, etc. If you're using a different config management solution, I'd suggest creating a new broker-type. Another best practice that seems valuable to mention is we generally avoid modifying the tasks, brokers, and hooks in /opt since that prevents future upgrades to those. If you want to take everything from one task but just override one file in it, there's a way to inherit from an existing task too, allowing you to modify just that one file. Instead, I suggest looking in /etc/puppetlabs/razor-server/brokers and making the change (probably creating the path /etc/puppetlabs/razor-server/brokers/<name>.task). Doing this will allow you to reference <name> as a broker-type when you're creating a broker instance (in the `create-broker` command). Hope that helps! Let me know if you have any other questions. Scott On Tue, Nov 14, 2017 at 6:00 PM Robroy Gregg < [email protected]> wrote: > -- -- PuppetConf 2016 <https://puppet.com/puppetconf>, 19 - 21 October, San Diego, California *Register to attend or sign up to view the Live Stream <https://puppet.com/puppetconf/registration-pricing>* -- You received this message because you are subscribed to the Google Groups "puppet-razor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/puppet-razor. For more options, visit https://groups.google.com/d/optout.
