Satellite 6 and Microsoft DNS integration

If you plan to deploy RHEL guests with Satellite 6 and your DNS server of choice is Microsoft DNS than Satellite 6 is also able to create / delete appropriate DNS entries for newly created hosts automatically via foremen-proxy on Microsoft DNS. This article describes on how to configure both Satellite 6 and Microsoft DNS.

Satellite 6 => Quit long running Foreman tasks

In some cases it could happen that a Foreman task in Satellite never ends without throwing any error message. In this case you can quit tasks with foreman-rake console.

The following tasks can destroy you database. So be careful. Continue reading Satellite 6 => Quit long running Foreman tasks

Foreman Template writing

Foreman uses common ERB style templating. Foreman templates consists of a mixture of Bash scripts and appropriate macros and functions. You can find a list of built-in macros and functions here. Within such macro you can use further Ruby code. For example to extract the last digits og an IP address you can use the following macro:

LAST_DIGIT=< %=@host.ip.to_s.split('.')[-1]%>

Where @host.ip is a built-in macro in Foreman (see link above), to_s is Ruby code and means “convert into string”, split wherever you find a “.” and read the output reverse and take the last value (“-1”).

If you want to check if a template will render correctly for an appropriate host you can open your template in your browser: