A while back, the Foreman developers released an Ansible Collection that contains modules to control almost any aspect of a Foreman server. This allows to apply the ‘Infrastructure as Code’ principle to my favorite OS Lifecycle and Deployment tool as well!
This is a companion discussion topic for the original entry at https://theforeman.org/2020/10/foreman-config-as-code.html