Add a dhcp_server role for noc and dhcp01
This commit is contained in:
parent
d574410f96
commit
9117585832
4 changed files with 2177 additions and 0 deletions
|
|
@ -109,3 +109,6 @@
|
|||
|
||||
- name: restart moksha-hub
|
||||
service: name=moksha-hub state=restarted
|
||||
|
||||
- name: restart dhcpd
|
||||
service: name=dhcpd state=restarted
|
||||
|
|
|
|||
321
roles/dhcp_server/files/dhcpd.conf.dhcp01.phx2.fedoraproject.org
Normal file
321
roles/dhcp_server/files/dhcpd.conf.dhcp01.phx2.fedoraproject.org
Normal file
|
|
@ -0,0 +1,321 @@
|
|||
server-identifier dhcp01.phx2.fedoraproject.org;
|
||||
ddns-update-style none;
|
||||
|
||||
subnet 10.5.125.0 netmask 255.255.255.0 {
|
||||
allow booting;
|
||||
allow bootp;
|
||||
|
||||
option domain-name "phx2.fedoraproject.org";
|
||||
option domain-name-servers 10.5.126.21, 10.5.126.22;
|
||||
option routers 10.5.125.254;
|
||||
# option vendor-class-identifier "PXEClient";
|
||||
# option vendor-encapsulated-options 09:0f:80:00:0c:4e:65:74:77:6f:72:6b:20:62:6f:6f:74:0a:07:00:50:72:6f:6d:70:74:06:01:02:08:03:80:00:00:47:04:80:00:00:00:ff;
|
||||
|
||||
|
||||
host unknown00 {
|
||||
hardware ethernet 00:21:5e:5b:19:96;
|
||||
fixed-address 10.5.125.33;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "unknown00.phx2.fedoraproject.org";
|
||||
# filename "yaboot";
|
||||
}
|
||||
|
||||
host sign-vault03 {
|
||||
hardware ethernet fc:99:47:49:43:84;
|
||||
fixed-address 10.5.125.73;
|
||||
option host-name "sign-vault03";
|
||||
next-server 10.5.126.41;
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host sign-vault04 {
|
||||
hardware ethernet fc:99:47:49:8d:fc;
|
||||
fixed-address 10.5.125.74;
|
||||
option host-name "sign-vault04";
|
||||
next-server 10.5.126.41;
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host bkernel01 {
|
||||
hardware ethernet 6c:ae:8b:1e:fd:82;
|
||||
fixed-address 10.5.125.51;
|
||||
option host-name "bkernel01";
|
||||
next-server 10.5.126.41;
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host bkernel02 {
|
||||
hardware ethernet 6c:ae:8b:1e:fd:6a;
|
||||
fixed-address 10.5.125.52;
|
||||
option host-name "bkernel02";
|
||||
next-server 10.5.126.41;
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host sign-vault01 {
|
||||
hardware ethernet 00:1a:64:67:a3:38;
|
||||
fixed-address 10.5.125.70;
|
||||
next-server 10.5.126.41;
|
||||
option host-name "sign-vault01";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host bvirthost01 {
|
||||
hardware ethernet e4:1f:13:6a:c5:58;
|
||||
fixed-address 10.5.125.124;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "bvirthost01";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host bvirthost04 {
|
||||
hardware ethernet E4:1F:13:BA:E8:28;
|
||||
fixed-address 10.5.125.127;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "bvirthost04";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host bvirthost06 {
|
||||
hardware ethernet 00:25:B5:FF:00:09;
|
||||
fixed-address 10.5.125.120;
|
||||
next-server 10.5.126.41;
|
||||
option host-name "bvirthost06";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host bvirthost07 {
|
||||
hardware ethernet 90:B1:1C:32:7E:8E;
|
||||
fixed-address 10.5.125.122;
|
||||
next-server 10.5.126.41;
|
||||
option host-name "bvirthost07";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host bvirthost08 {
|
||||
hardware ethernet 00:25:B5:FF:00:07;
|
||||
fixed-address 10.5.125.123;
|
||||
next-server 10.5.126.41;
|
||||
option host-name "bvirthost08";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host bvirthost09 {
|
||||
hardware ethernet 00:25:B5:FF:00:0F;
|
||||
fixed-address 10.5.125.117;
|
||||
next-server 10.5.126.41;
|
||||
option host-name "bvirthost09";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host bvirthost10 {
|
||||
hardware ethernet 00:25:B5:FF:00:0D;
|
||||
fixed-address 10.5.125.118;
|
||||
next-server 10.5.126.41;
|
||||
option host-name "bvirthost10";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host bvirthost11 {
|
||||
hardware ethernet 00:25:B5:FF:00:0B;
|
||||
fixed-address 10.5.125.119;
|
||||
next-server 10.5.126.41;
|
||||
option host-name "bvirthost11";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
|
||||
host buildvmhost-10 {
|
||||
hardware ethernet 00:25:B5:FF:00:03;
|
||||
fixed-address 10.5.125.132;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "buildvmhost-10";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host buildvmhost-11 {
|
||||
hardware ethernet 00:25:B5:FF:00:01;
|
||||
fixed-address 10.5.125.133;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "buildvmhost-11";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host buildvmhost-12 {
|
||||
hardware ethernet 00:25:B5:FF:00:05;
|
||||
fixed-address 10.5.125.134;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "buildvmhost-12";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host buildhw-01 {
|
||||
hardware ethernet e4:1f:13:78:19:6c;
|
||||
fixed-address 10.5.125.94;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "buildhw-01.phx2.fedoraproject.org";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host buildhw-02 {
|
||||
hardware ethernet e4:1f:13:78:0d:40;
|
||||
fixed-address 10.5.125.93;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "buildhw-02.phx2.fedoraproject.org";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host buildhw-03 {
|
||||
hardware ethernet E4:1F:13:78:0C:A4;
|
||||
fixed-address 10.5.125.97;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "buildhw-03.phx2.fedoraproject.org";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host buildhw-04 {
|
||||
hardware ethernet E4:1F:13:78:4E:80;
|
||||
fixed-address 10.5.125.95;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "buildhw-04.phx2.fedoraproject.org";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host buildhw-05 {
|
||||
hardware ethernet E4:1F:13:78:20:44;
|
||||
fixed-address 10.5.125.96;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "buildhw-05.phx2.fedoraproject.org";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host buildhw-06 {
|
||||
hardware ethernet e4:1f:13:78:38:68;
|
||||
fixed-address 10.5.125.114;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "buildhw-06.phx2.fedoraproject.org";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host buildhw-07 {
|
||||
hardware ethernet e4:1f:13:78:15:5c;
|
||||
fixed-address 10.5.125.115;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "buildhw-07.phx2.fedoraproject.org";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host buildhw-08 {
|
||||
hardware ethernet E4:1F:13:78:34:54;
|
||||
fixed-address 10.5.125.129;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "buildhw-08.phx2.fedoraproject.org";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host buildhw-09 {
|
||||
hardware ethernet E4:1F:13:78:0D:DC;
|
||||
fixed-address 10.5.125.130;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "buildhw-09.phx2.fedoraproject.org";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host buildhw-10 {
|
||||
hardware ethernet E4:1F:13:78:52:58;
|
||||
fixed-address 10.5.125.131;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "buildhw-10.phx2.fedoraproject.org";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host buildhw-11 {
|
||||
hardware ethernet e4:1f:13:78:19:d4;
|
||||
fixed-address 10.5.125.125;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "buildhw-11.phx2.fedoraproject.org";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host buildhw-12 {
|
||||
hardware ethernet E4:1F:13:78:15:40;
|
||||
fixed-address 10.5.125.126;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "buildhw-12.phx2.fedoraproject.org";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host x86-16 {
|
||||
hardware ethernet e4:1f:13:78:34:54;
|
||||
fixed-address 10.5.125.86;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "x86-16.phx2.fedoraproject.org";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host x86-17 {
|
||||
hardware ethernet e4:1f:13:78:0d:dc;
|
||||
fixed-address 10.5.125.87;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "x86-17.phx2.fedoraproject.org";
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
host x86-18 {
|
||||
hardware ethernet e4:1f:13:78:52:58;
|
||||
fixed-address 10.5.125.88;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "x86-18.phx2.fedoraproject.org";
|
||||
}
|
||||
|
||||
host ucs-blade01 {
|
||||
hardware ethernet 00:25:b5:ff:00:00;
|
||||
fixed-address 10.5.125.20;
|
||||
next-server 10.5.125.43;
|
||||
option host-name "ucs-blade01.phx2.fedoraproject.org";
|
||||
}
|
||||
|
||||
# host x86-19 {
|
||||
# hardware ethernet e4:1f:13:78:19:d4;
|
||||
# fixed-address 10.5.125.89;
|
||||
# next-server 10.5.125.43;
|
||||
# option host-name "x86-19.phx2.fedoraproject.org";
|
||||
# }
|
||||
|
||||
# host x86-20 {
|
||||
# hardware ethernet e4:1f:13:78:15:40;
|
||||
# fixed-address 10.5.125.90;
|
||||
# next-server 10.5.125.43;
|
||||
# option host-name "x86-20.phx2.fedoraproject.org";
|
||||
# }
|
||||
|
||||
group macs {
|
||||
allow booting;
|
||||
allow bootp;
|
||||
|
||||
option domain-name "phx2.fedoraproject.org";
|
||||
option domain-name-servers 10.5.126.21, 10.5.126.22;
|
||||
option routers 10.5.125.254;
|
||||
|
||||
filename "yaboot";
|
||||
authoritative;
|
||||
option dhcp-max-message-size 576;
|
||||
option dhcp-parameter-request-list = concat(
|
||||
option dhcp-parameter-request-list,
|
||||
dc, dd, e6, e8, e9, ea, eb, ec, ed, ee); # mac options
|
||||
|
||||
host ppc02 {
|
||||
hardware ethernet 26:49:30:a8:7f:04;
|
||||
fixed-address 10.5.125.30;
|
||||
next-server 10.5.126.41;
|
||||
option host-name "ppc02.phx2.fedoraproject.org";
|
||||
filename "yaboot";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
# range 10.5.125.170 10.5.125.189;
|
||||
# next-server 10.5.125.43;
|
||||
# filename "pxelinux.0";
|
||||
}
|
||||
1829
roles/dhcp_server/files/dhcpd.conf.noc01.phx2.fedoraproject.org
Normal file
1829
roles/dhcp_server/files/dhcpd.conf.noc01.phx2.fedoraproject.org
Normal file
File diff suppressed because it is too large
Load diff
24
roles/dhcp_server/tasks/main.yml
Normal file
24
roles/dhcp_server/tasks/main.yml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
- name: install dhcp server package
|
||||
yum: state=installed name=dhcp
|
||||
tags:
|
||||
- packages
|
||||
- base
|
||||
- dhcp_server
|
||||
|
||||
- name: setup dhcpd.conf
|
||||
copy: src=dhcpd.conf.{{ inventory_hostname }} dest=/etc/dhcp/dhcpd.conf mode=644
|
||||
notify:
|
||||
- restart dhcpd
|
||||
tags:
|
||||
- sshd_config
|
||||
- config
|
||||
- sshd
|
||||
- dhcp_server
|
||||
|
||||
- name: enable dhcpd service
|
||||
service: state=running enabled=true name=dhcpd
|
||||
tags:
|
||||
- service
|
||||
- config
|
||||
- dhcp_server
|
||||
Loading…
Add table
Add a link
Reference in a new issue