How to run a shell script after install?

Hi all (yes I am a compleet noob at foreman atm)

So, I managed to install foreman, setup autocreation of a VM and deploy an os with the builtin scripts.
Now when I installed a debian machine, I want to run an own made shell script to install the packages I want and to customize some parameters (like make a vimrc file etc).

Can anyone give me an example or tell me how I can do this?

Hello @bLackCat-79 - glad to hear that you’ve made some progress!

It sounds to me like you’re looking for this: Managing Hosts

Not sure if you managed to find the best solution for your case. Based on the other post you found REX plugin, which is one option. If you want to automate it as part of the provisioning, you can adjust the debian provisioning template, namely the finish one. Some customization is even doable through using parameters, default provisioning reflect some well known names, such as “disable-firewall”, “use-ntp” or so. One needs to read through the template to find out.

1 Like