Cobbler template files

Cobbler provides template files for dhcp/pxe/bind/dnsmasq configuration.
If you decide to manage there relevant services via cobbler, their configuration files are based on these templates that can be customized according to own needs.
Note that Cobbler overwrites and updates these configuration files if is configured to do that (for dhcp/dns/dnsmasq) every time you type cobbler sync.

/etc/cobbler/pxe/pxedefault.template
It's the main template file for PXE menu. Here you can change the PXE menus shown at boot time.  
This template replaces /tftpboot/pxelinus.cfg/default when cobbler sync is run.  
Important settings are:  
TIMEOUT: Idle Timeout. After this time PXE goes on with what is defined in ONTIMEOUT  
MENU TITLE: Just a string written at the beginning of the PXE menu  
DEFAULT: Default behaviour at PXE boot. Can be menu, to show the menu, the name of a label, to install what is defined in the label, local, to go on with a normal boot from local media.  
PROMPT: If set to 1 a simple prompt is shown.  
In the template $pxe_menu_items is replaced by all the systems and profiles configured in cobbler.    
DEFAULT menu
PROMPT 0
MENU TITLE Lab42 | http://www.lab42.it
TIMEOUT 200
TOTALTIMEOUT 6000
ONTIMEOUT local

LABEL local
MENU LABEL (local)
MENU DEFAULT
LOCALBOOT 0

$pxe_menu_items

MENU end



/etc/cobbler/pxe/pxeprofile.template  
The layout of the snippets of text to be inserted as single labels for a profile in place of    $pxe_menu_items in pxedefault.template
LABEL $profile_name
kernel $kernel_path
$menu_label
$append_line



/etc/cobbler/pxe/pxesystem.template
The layout of the snippets of text to be inserted as single labels for a system in place of $pxe_menu_items in pxedefault.template
  
default linux
prompt 0
timeout 1
label linux
kernel $kernel_path
$append_line
    

/etc/cobbler/dhcp.template
Template for ISC dhcp configuration file. Here you can define custom settings for your network and leave cobbler automatically populate host definitions in $insert_cobbler_system_definitions for defined systems (Mac address of the system is necessary here).  
ISC dhcp config file is managed (overwritten) by Cobbler according to this template if you define  manage_dhcp: 1 and manage_dhcp_mode=isc  in /etc/cobbler/settings .  

# generated from cobbler dhcp.conf template ($date)    
ddns-update-style interim;    
ignore client-updates;    
allow booting;    
allow bootp;
#if $omapi_enabled
omapi-port $omapi_port;
#end if
ignore client-updates;    
set vendorclass = option vendor-class-identifier;    
subnet 10.42.0.0 netmask 255.255.255.0 {    
     option routers          10.42.0.254;    
     option domain-name-servers     10.42.0.10;    
     option domain-name      "lab42.it";    
     option subnet-mask      255.255.255.0;    
     range dynamic-bootp     10.42.0.100 10.42.0.199;    
     filename                "/pxelinux.0";    
     default-lease-time      21600;    
     max-lease-time          43200;    
     server-name             "start";    
     next-server             $next_server;    
}    

[ ... ]  
    
/etc/cobbler/dnsmasq.template
Template for dnsmasq configuration file.  
Dnsmasq config file is managed (overwritten) by Cobbler according to this template if you define  manage_dhcp: 1 and manage_dhcp_mode=dnsmasq  in /etc/cobbler/settings .
# Cobbler generated configuration file for dnsmasq
# $date
#

# resolve.conf .. ?
#no-poll
#enable-dbus
read-ethers
addn-hosts = /var/lib/cobbler/cobbler_hosts

dhcp-range=192.168.1.5,192.168.1.200
dhcp-option=3,$next_server
dhcp-lease-max=1000
dhcp-authoritative
dhcp-boot=pxelinux.0
dhcp-boot=net:normalarch,pxelinux.0
dhcp-boot=net:ia64,$elilo

$insert_cobbler_system_definitions    


/etc/cobbler/named.template
Template for bind's named.conf .
It's overwritten by Cobbler if you define  manage_dns: 1 in /etc/cobbler/settings .

options {
listen-on port 53 { 127.0.0.1; };
directory       "/var/named";
dump-file       "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query     { localhost; };
recursion yes;
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

[ ... ]

Privacy Policy