**Problem: I am using Satellite 6.7 in an isolated lab environment. I have gotten Discovery and Provisioning working which means I have a lot of the pieces set up at this point. I have 2 different Host groups A and B for now. I’m trying to modify the hostname such that it maps to the group name and a unique count mapping to total ever included in the host group. I’m using ERB in the Discovery Rules to try and set the hostname. I have succeeded as far as <%= @host.hostgroup.name %>-<%= rand(99999) %> . Instead of using the random number I want to start at 1 and increment. I tried creating a hostgroup parameter called count that I intended to increase by 1 every time using a <% @host.hostgroup.count += 1 %> type of element but I can’t figure out how to reference the parameter. Is this the best way to achieve my goal? I’m happy with something simpler
Expected outcome: Hostnames match host group and are incremented A-1, A-2, A-3, etc.
Foreman and Proxy versions: Satellite 6.7
Foreman and Proxy plugin versions: Unknown
Distribution and version: Unknown
Other relevant data:
N/A