Getting cobbler installed and configured is pretty easy. Here are the steps I typically use on a Fedora-derived system:
$ yum -y install cobbler httpd fence-agents debmirror
$ sed -i 's/^\(.*disable.*=\).*/\1 no/' /etc/xinetd.d/tftp
$ systemctl enable cobblerd.service
$ systemctl start cobblerd.service
$ systemctl enable httpd
$ systemctl start httpd
$ systemctl enable tftp
$ systemctl start tftp
$ vi /etc/cobbler/settings
$ cobbler check
$ cobbler sync
$ mount -o loop CENTOS_DVD /mnt
$ cobbler import --name=centos7 --arch=x86_64 --path=/mnt
$ cobbler distro list
$ cobbler distro report --name=centos7
You can use cobbler system add to create a new system:
$ cobbler system add --name=$FQDN --profile=$PROFILE --mac=$MACADDR --ip-address=$IPADDR \ --netmask=$NETMASK --static=1 --dns-name=$FQDN --gateway=$GATEWAY \ --interface=$INTERFACE --name-servers-search="prefetch.net" \ --kickstart="/var/lib/cobbler/kickstarts/${profile}.ks" \ --name-servers=$DNS_SERVERS
To verify the system is present you can use the report option:
$ cobbler system report $FQDN
If everything succeeded up to this point you should be able to PXE boot your host.
$ cat /var/lib/cobbler/snippets/post_installation_tasks
echo "Applying the latest set of system updates to the server"
/usr/bin/dnf -y update
if [$? -ne 0]; then
exit 1
fi
echo "Installing ansible to manage our systems"
/usr/bin/dnf -y install ansible
if [$? -ne 0]; then
exit 1
fi
echo "Installing git to pull down our configuration repository"
dnf -y install git
if [$? -ne 0]; then
exit 1
fi
echo "Running ansible to lay down the base system configuration"
mkdir /ansible && cd /ansible
git clone https://myrepo/ansible
if [$? -ne 0]; then
exit 1
fi
ansible-playbook site.yml
if [$? -ne 0]; then
exit 1
fi