I’m setting up a new The Foreman instance (using the Docker Compose setup) and I’m trying to reduce the manual setup steps to a minimum. Hence, I’d like use a configuration file or a template to preconfigure e.g.
OS (Hosts > Operating Systems)
domain (Infrastructure > Domains)
host group (Configure > Host Groups)
AD integration (Administer > LDAP Auth)
Configure reduced UI for unprivileged users
Is there a generic way to make this work?
I apologize if my question seems stupid and the solution is obvious (I’m not a Ruby person). I’ve seen there is “seeding” (e.g. the rake db:seed command) and “seeding templates”. Is that the way to go?
Any hint in the right direction is really appreciated.
These are both super-helpful hints and usable approaches, thanks!
The only downside is that you need to install an external tool (either hammer-cli-foreman or Ansible) and run them from the outside (with user/password authentication).
I would have hoped that there was some rake command that would simply take a fixture, maybe a YAML file, which could be run as part of the setup, after the database migration.
Is there nothing like that? How does the “rake db:seed” command work? Is that hard-coded?
for some value of hard-coded. you can see the seeds in the db/seeds.d directory, but to change these you’d have to rebuild the container (or enter a running one, modify the files, and run db:seed again).