Forge Home

cobbler

Module manages cobbler: linux installation server that allows for rapid setup of network installation environments

21,424 downloads

18,300 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.3.3 (latest)
  • 0.3.2
  • 0.3.1
  • 0.3.0
  • 0.2.1
  • 0.2.0
  • 0.1.1
  • 0.1.0
released Jan 5th 2016
This version is compatible with:
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'abaranov-cobbler', '0.3.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add abaranov-cobbler
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install abaranov-cobbler --version 0.3.3

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

abaranov/cobbler — version 0.3.3 Jan 5th 2016

cobbler Build Status

Table of Contents

  1. Overview
  2. Module Description
  3. Setup
  4. Usage
  5. Reference
  6. Limitations

Overview

This module manages installation and configuration cobbler itself as well as cobbler objects such as distros, profiles, systems and repos.

Module Description

Module installs cobbler servers. Module performs cobbler configuration, including main configuration file, and cobbler modules. Module provides custom types for cobbler objects:

  • cobbler_distro - cobbler distributions
  • cobbler_repo - cobbler repositories
  • cobbler_profile - cobbler profiles
  • cobbler_system - cobbler systems

Setup

What cobbler affects

  • Module installs (including dependencies):

    • cobbler
    • syslinux
    • syslinux-tftpboot

    This can be overwritten using package parameter of cobbler class

  • Modules manages files:

    • /etc/cobbler/settings
    • /etc/cobbler/modules.conf
  • Affected services:

    • cobblerd

Setup Requirements

This module uses custom types and providers so pluginsync must be enabled.

Beginning with cobbler

For a basic installation setup with a default configuration parameters it's just enough to declare cobbler module inside the manifest

class {'cobbler':}

Usage

To pass any configuration parameters the cobbler_config parameter is used. cobbler_config is merged with default_cobbler_config from params.pp and pushed to /etc/cobbler/settings file

cobbler_config must be a hash that contains cobbler configuration options:

$cobbler_settings = {
    'server'        => '192.168.0.1',
    'next_server'   => '192.168.0.1',
    'pxe_just_once' => 1
}

class {'cobbler':
  cobbler_config => $cobbler_settings,
}

For cobbler mopdules configuration cobbler_modules_config parameter is used. As well as _cobbler_config modules configuration passed to the class is merged with default_modules_config from params.pp

$modules_settings = {
  'dns'  => {'module' => 'manage_dnsmasq'},
}

class {'cobbler':
  cobbler_modules_config => $modules_settings,
}

Cobbler objects are managed using custom types. One of the ways to create distributions, repositories, profiles and systems is to pass hash to create_resources function. For example:

  • Using hiera:
cobbler::distros:
  centos7-x86_64:
    ensure: present
    comment: 'CentOS7 Distribution'
    arch: x86_64
    path: /mnt
    initrd: '/var/www/cobbler/ks_mirror/centos7-minimal-x86_64/images/pxeboot/initrd.img'
    kernel: '/var/www/cobbler/ks_mirror/centos7-minimal-x86_64/images/pxeboot/vmlinuz'
    owners:
      - admin

create_resources('cobbler_distro', hiera('cobbler::distros')

or

  • Using puppet hash
$interfaces = {
  'eth0'       => {
    ip_address => '192.168.1.6',
    netmask    => '255.255.255.0',
    if_gateway => '192.168.1.1',
  },
  'eth1'       => {
    ip_address => '192.168.100.10',
    netmask    => '255.255.255.0',
    if_gateway => '192.168.100.1',
  },
  'eth2'       => {
    ip_address => '192.168.200.11',
    netmask    => '255.255.255.0',
    if_gateway => '192.168.200.1',
  }
}
$systems = {
  'testhost01' => {
    ensure     => 'present',
    profile    => 'cvo_mgmt_server',
    interfaces => $interfaces,
    hostname   => 'testhost01',
}

create_resources('cobble_system', $systems)

Reference

That module contains:

  • Custom types:
    • cobbler_distro
    • cobbler_repo
    • cobbler_profile
    • cobbler_system

Limitations

  • osfamily => RedHat
  • if getenforce == Enforcing
    • setsebool -P httpd_can_network_connect_cobbler 1
    • setsebool -P httpd_serve_cobbler_files 1
    • semanage fcontext -a -t cobbler_var_lib_t "/var/lib/tftpboot/boot(/.*)?"