Restructuring/renaming DNS, DHCP, TFTP and netboot installer.
Idea: The role 'dnsmasq' and a new role 'dns-dhcp-tftp' are drop-in replacements and interchangeable. 'netboot-installer' works indepently of the role chosen for DNS, DHCP and TFTP.
This commit is contained in:
parent
e55997a01c
commit
ebcfd88ef4
10 changed files with 18 additions and 18 deletions
|
@ -47,8 +47,8 @@
|
||||||
roles:
|
roles:
|
||||||
- up2date-debian
|
- up2date-debian
|
||||||
- two-interface-firewalld
|
- two-interface-firewalld
|
||||||
- dhcp-dns-dnsmasq
|
- netboot-installer
|
||||||
- tftp-netboot-installer
|
- dnsmasq
|
||||||
- apt-cacher
|
- apt-cacher
|
||||||
- { role: krb5-kdc-ldap, when: not run_in_installer|default(false)|bool }
|
- { role: krb5-kdc-ldap, when: not run_in_installer|default(false)|bool }
|
||||||
- { role: nfs-server, when: not run_in_installer|default(false)|bool }
|
- { role: nfs-server, when: not run_in_installer|default(false)|bool }
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
interface={{ if_lan }}
|
|
||||||
dhcp-range={{ dhcp_range }}
|
|
||||||
dhcp-generate-names
|
|
|
@ -9,8 +9,14 @@
|
||||||
- resolvconf
|
- resolvconf
|
||||||
state: latest
|
state: latest
|
||||||
|
|
||||||
- name: configure dnsmasq
|
- name: configure dnsmasq dhcp
|
||||||
template:
|
template:
|
||||||
src: dnsmasq-dhcp.j2
|
src: dnsmasq-dhcp.j2
|
||||||
dest: /etc/dnsmasq.d/dnsmasq-dhcp
|
dest: /etc/dnsmasq.d/dnsmasq-dhcp
|
||||||
notify: "restart dnsmasq"
|
notify: "restart dnsmasq"
|
||||||
|
|
||||||
|
- name: configure dnsmasq tftp
|
||||||
|
template:
|
||||||
|
src: dnsmasq-tftp-netboot-installer.j2
|
||||||
|
dest: /etc/dnsmasq.d/tftp-netboot-installer
|
||||||
|
notify: "restart dnsmasq"
|
3
roles/dnsmasq/templates/dnsmasq-dhcp.j2
Normal file
3
roles/dnsmasq/templates/dnsmasq-dhcp.j2
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
interface={{ if_lan }}
|
||||||
|
dhcp-range={{ dhcp_start }},{{ dhcp_stop }},2h
|
||||||
|
dhcp-generate-names
|
|
@ -17,14 +17,7 @@
|
||||||
src: /usr/share/doc/di-netboot-assistant/examples/preseed.cfg
|
src: /usr/share/doc/di-netboot-assistant/examples/preseed.cfg
|
||||||
dest: "{{ tftp_root }}/d-i/{{ di_dist }}"
|
dest: "{{ tftp_root }}/d-i/{{ di_dist }}"
|
||||||
force: no
|
force: no
|
||||||
|
remote_src: yes
|
||||||
- name: configure dnsmasq
|
|
||||||
template:
|
|
||||||
src: dnsmasq-tftp-netboot-installer.j2
|
|
||||||
dest: /etc/dnsmasq.d/tftp-netboot-installer
|
|
||||||
notify:
|
|
||||||
- restart dnsmasq
|
|
||||||
- rebuild di-netboot-assistant menu
|
|
||||||
|
|
||||||
- name: make the hostname resolvable from the LAN
|
- name: make the hostname resolvable from the LAN
|
||||||
replace:
|
replace:
|
|
@ -18,8 +18,9 @@
|
||||||
|
|
||||||
## LAN IP address range:
|
## LAN IP address range:
|
||||||
ipaddr_lan: 192.168.0.10/24
|
ipaddr_lan: 192.168.0.10/24
|
||||||
dhcp_range: 192.168.0.50,192.168.0.99,2h
|
dhcp_start: 192.168.0.50
|
||||||
in_inventory: 192.168.0.[50:99]
|
dhcp_stop: 192.168.0.150
|
||||||
|
in_inventory: 192.168.0.[50:150]
|
||||||
|
|
||||||
di_dist: "{{ ansible_distribution_release }}"
|
di_dist: "{{ ansible_distribution_release }}"
|
||||||
di_version: 10 #"{{ ansible_distribution_major_version }}"
|
di_version: 10 #"{{ ansible_distribution_major_version }}"
|
||||||
|
@ -49,8 +50,8 @@
|
||||||
roles:
|
roles:
|
||||||
- up2date-debian
|
- up2date-debian
|
||||||
- two-interface-firewalld
|
- two-interface-firewalld
|
||||||
- dhcp-dns-dnsmasq
|
- netboot-installer
|
||||||
- tftp-netboot-installer
|
- dns-dhcp-tftp
|
||||||
- apt-cacher
|
- apt-cacher
|
||||||
- samba-ldap
|
- samba-ldap
|
||||||
- prepare4clients
|
- prepare4clients
|
||||||
|
|
Loading…
Add table
Reference in a new issue