This module manages installation and configuration cobbler itself as well as cobbler objects such as distros, profiles, systems and repos.
Module installs cobbler servers. Module performs cobbler configuration, including main configuration file, and cobbler modules. Module provides custom types for cobbler objects:
Module installs (including dependencies):
This can be overwritten using package parameter of cobbler class
Modules manages files:
Affected services:
This module uses custom types and providers so pluginsync must be enabled.
For a basic installation setup with a default configuration parameters it's just enough to declare cobbler module inside the manifest
class {'cobbler':}
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 _cobblerconfig modules configuration passed to the class is merged with _default_modulesconfig 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 _createresources function. For example:
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
$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)
That module contains: