Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with cobbler
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module


Cobbler module allows you to set up Cobbler and add distros, repos, profiles and systems with minimal effort.

Module Description

Cobbler is a Linux installation server that allows for rapid setup of network installation environments. This module provides a simplified way of setting up Cobbler, and later managing internal Cobbler resources like distros and systems. Module helps in a way that allows you to visualise configuration of distros/repos/profiles/systems via puppet code instead of remembering long and cumbersome CLI commands.


What cobbler affects

  • configuration files and directories (contents of /etc/cobbler)
  • internal Cobbler database entries (distro, repo, profile, system)

Setup requirements

Some functionality is dependent on other modules: * apache

Beginning with cobbler

To install Cobbler with the default parameters, just define class:

    include ::cobbler

To set up cobbler web management interface:

    include ::cobbler::web


Modifying defaults

Defaults are determined depending on operating system. This action will install cobbler, tftp and syslinux. It will use PuppetLabs-Apache module to set up Apache with mod_wsgi, and to set up /cobbler context and /distros context in Apache. If you wish to mangle with parameters, you can do it using hiera, for example:

    cobbler::distro_path     : '/data/distro'
    cobbler::manage_dhcp     : 1
    cobbler::server_ip       : ''
    cobbler::next_server_ip  : ''
    cobbler::allow_access    : ''
    cobbler::dhcp::nameservers   : - ''
                                   - ''
    cobbler::dhcp::dynamic_range : 1
    cobbler::dhcp::subnets: - ''
                            - ''
    cobbler::purge_profile: True
    cobbler::purge_system:  True

Cobbler distro

Distro is an object in Cobbler representing Linux distribution, with its own kernel, installation and packages.

You can easily add distros to your Cobbler installation just by specifying download link of ISO image and distro name:

    cobbler::add_distro { 'CentOS-6.5-x86_64':
      arch    => 'x86_64',
      isolink => '',

If you want to use 'cobbler import' style, you can add a distro other way:

    cobblerdistro { 'SL-6.5-x86_64':
      ensure  => present,
      path    => '/distro/SL64/x86_64/os',
      ks_meta => {
       'tree' => '',

ks_meta's parameter's 'tree' value is used as '--available-as' option.

Cobbler repo

Repo is an Cobbler object representing a distribution package repository (for example yum repo).

If you wish to mirror additional repositories for your kickstart installations, it's as easy as:

    cobblerrepo { 'PuppetLabs-6-x86_64-deps':
      ensure         => present,
      arch           => 'x86_64',
      mirror         => '',
      mirror_locally => false,
      priority       => 99,
      require        => [ Service[$cobbler::service_name], Service[$cobbler::apache_service] ],

Cobbler profile

Profile is an Cobbler object representing a pre-configured set of distro/repos/settings for kickstarting a node.

Simple profile definition looks like:

    cobblerprofile { 'CentOS-6.5-x86_64':
      ensure      => present,
      distro      => 'CentOS-6.5-x86_64',
      nameservers => $cobbler::nameservers,
      repos       => ['PuppetLabs-6-x86_64-deps', 'PuppetLabs-6-x86_64-products' ],
      kickstart   => '/somepath/kickstarts/CentOS-6.5-x86_64-static.ks',

Cobbler system

System is an Cobbler object representing a single node that can be kickstarted.

Typical definition looks like:

    cobblersystem { 'somehost':
      ensure     => present,
      profile    => 'CentOS-6.5-x86_64',
      interfaces => { 'eth0' => {
                        mac_address      => 'AA:BB:CC:DD:EE:F0',
                        interface_type   => 'bond_slave',
                        interface_master => 'bond0',
                        static           => true,
                        management       => true,
                      'eth1' => {
                        mac_address      => 'AA:BB:CC:DD:EE:F1',
                        interface_type   => 'bond_slave',
                        interface_master => 'bond0',
                        static           => true,
                      'bond0' => {
                        ip_address     => '',
                        netmask        => '',
                        static         => true,
                        interface_type => 'bond',
                        bonding_opts   => 'miimon=300 mode=1 primary=em1',
      netboot    => true,
      gateway    => '',
      hostname   => '',
      require    => Service[$cobbler::service_name],




This module was tested with following operating systems: CentOS 5/6 Ubuntu LTS 12.04/14.04

Module is tested against Cobbler 2.4 & 2.6.



Cobbler module Forge is open project, and community contributions are welcome.


  • jsosic ( - original author
  • igalic ( - advancement in virtual environments and Debian based support