Feature #334

Clone a hostgroup

Added by Benjamin Papillon about 9 years ago. Updated over 6 years ago.

Web Interface
Target version:
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:


We are trying foreman to deploy our sites.
One site consists of 3 servers and we have to define the same variables (around 20) for all groups.

An interesting feature would be to have a "group template" or a inheriting variables names defined in the environment section. That way, we would not forget to create a variable inside a new group.

Related issues

Related to Foreman - Feature #563: Allow import and export "parameters" to/from a file (Global and on every level I can set parameters)Resolved2011-01-04

Associated revisions

Revision 4899723c (diff)
Added by Ohad Levy over 8 years ago

fixes #334 - Clone a hostgroup


#1 Updated by Ohad Levy about 9 years ago

  • Status changed from New to Need more information

I'm not really sure I understand what you are asking for.. are you asking for the fields to per visible when editing a host? or maybe you just want to use the global/common parameters?

#2 Updated by Benjamin Papillon about 9 years ago

I'll try to clarify what I'd like with my poor english ;)

Here, we manage ~50 groups of 3 hosts (1 firewall, 2 proxies). The nodes are installed by default with the same master and same IP settings.

We want to move the 2 proxies to puppet and foreman as a node classifer.
The process we found to install the servers is the following :
- create a new group
- create variables for this group (ipaddress_relay1, ipaddress_relay2, domain, ipaddress_gateway, MS domain parameters for proxy auth...)
- create the new servers
- affect classes to nodes and group
- on the puppetmaster, use puppetmasterd to compile catalog using the "install" environment
- on the nodes, apply the catalog and then, move the nodes to the "production" environment at next reboot. (It's better to reboot since we are changing ip and hostname settings)
- manage day to day nodes with foreman :)

The problem using this procedure is the second step. It's really easy to forget the creation of one variable or to misspell one.

The feature I'd like is pre-populate the list of variables to enter for a group. It can be done depending the environment or a "group template" where you can store default classes and variables for new groups.


#3 Updated by Ohad Levy about 9 years ago

would cloning an existing host group solves your problem?

#4 Updated by Benjamin Papillon about 9 years ago

Yep! It would solve this problem.


#5 Updated by Ohad Levy about 9 years ago

  • Subject changed from Add pre-created variables for new groups to Clone a hostgroup

#6 Updated by Ohad Levy almost 9 years ago

  • Status changed from Need more information to Assigned
  • Target version set to 0.2

#8 Updated by Bash Shell almost 9 years ago

We use a rake task for this.

An easier alternative would be nice.

#9 Updated by Marcello de Sousa over 8 years ago

Would be nice to have a more general approach to this and allow you not only to clone host groups, but any clone level of parameters "set". Please correct me if I'm wrong, but it seems like Feature #563 would also help here.

#10 Updated by Ohad Levy over 8 years ago

  • Status changed from Assigned to Ready For Testing
  • % Done changed from 0 to 100

#11 Updated by Ohad Levy over 8 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF