1 安装包
yum install cobbler(EPEL) dhcp
systemctl enable cobblerd dhcpd httpd tftp
systemctl start cobblerd httpd tftp
2 cobbler check
3 vim /etc/cobbler/settings
server:cobberserverip
next_server:cobberserverip
defaut_password_cryptd: "xxxxxxxxxx" #openssl passwd -1 生成口令
manage_dhcp:1
4 cobber get-loaders 联网
cobbler sync
5 vim /etc/cobbler/dhcp.template
subnet 192.168.30.0 netmask 255.255.255.0
range dynamic-bootp 192.168.30.10 192.168.30.200;
cobbler sync
systemctl restart dhcpd
6
/dev/sr0 8490330 8490330 0 100% /mnt/cdrom0
/dev/sr1 6049912 6049912 0 100% /mnt/cdrom1
cobbler import --path=/mnt/cdrom0 --name=CentOS_7.4-x86_64 --arch=x86_64
cobbler import --path=/mnt/cdrom1 --name=CentOS_6.9-x86_64 --arch=x86_64
cobbler distro list
7
#cat ks6_mini.cfg
url --url=$tree
cp ks7_desktop.cfg ks6_mini.cfg /var/lib/cobbler/kicstarts/
cobbler profile add --name=CentOS_7.4-x86_64_Desktop --distro=CentOS_7.4-x86_64 --kickstart=/var/lib/cobbler/kicstarts/ks7_desktop.cfg
cobbler profile add --name=CentOS_6.9-x86_64_Mini --distro=CentOS_6.9-x86_64 --kickstart=/var/lib/cobbler/kicstarts/ks6_mini.cfg
删除自带的配置
cobbler profile remove --name=CentOS_7.4-x86_64
cobbler profile remove --name=CentOS_6.9-x86_64
8 web实现
yum install cobbler-web
systemctl restart httpd
htdigest -c /etc/cobbler/users.digest Cobbler test1
https://cobberserverip/cobbler_web/
ansible module
ansible -s module
ping
command
shell
script
copy
fetch
file
hostname
cron
yum
service
user
group