diff --git a/kerberox.yml b/kerberox.yml index ce8bbed..edb56d3 100644 --- a/kerberox.yml +++ b/kerberox.yml @@ -47,8 +47,8 @@ roles: - up2date-debian - two-interface-firewalld - - dhcp-dns-dnsmasq - - tftp-netboot-installer + - netboot-installer + - dnsmasq - apt-cacher - { role: krb5-kdc-ldap, when: not run_in_installer|default(false)|bool } - { role: nfs-server, when: not run_in_installer|default(false)|bool } diff --git a/roles/dhcp-dns-dnsmasq/templates/dnsmasq-dhcp.j2 b/roles/dhcp-dns-dnsmasq/templates/dnsmasq-dhcp.j2 deleted file mode 100644 index 61f82c2..0000000 --- a/roles/dhcp-dns-dnsmasq/templates/dnsmasq-dhcp.j2 +++ /dev/null @@ -1,3 +0,0 @@ -interface={{ if_lan }} -dhcp-range={{ dhcp_range }} -dhcp-generate-names diff --git a/roles/dhcp-dns-dnsmasq/handlers/main.yml b/roles/dnsmasq/handlers/main.yml similarity index 100% rename from roles/dhcp-dns-dnsmasq/handlers/main.yml rename to roles/dnsmasq/handlers/main.yml diff --git a/roles/dhcp-dns-dnsmasq/tasks/main.yml b/roles/dnsmasq/tasks/main.yml similarity index 61% rename from roles/dhcp-dns-dnsmasq/tasks/main.yml rename to roles/dnsmasq/tasks/main.yml index 48bae66..d5e7fc2 100644 --- a/roles/dhcp-dns-dnsmasq/tasks/main.yml +++ b/roles/dnsmasq/tasks/main.yml @@ -9,8 +9,14 @@ - resolvconf state: latest -- name: configure dnsmasq +- name: configure dnsmasq dhcp template: src: dnsmasq-dhcp.j2 dest: /etc/dnsmasq.d/dnsmasq-dhcp notify: "restart dnsmasq" + +- name: configure dnsmasq tftp + template: + src: dnsmasq-tftp-netboot-installer.j2 + dest: /etc/dnsmasq.d/tftp-netboot-installer + notify: "restart dnsmasq" diff --git a/roles/dnsmasq/templates/dnsmasq-dhcp.j2 b/roles/dnsmasq/templates/dnsmasq-dhcp.j2 new file mode 100644 index 0000000..29f73dd --- /dev/null +++ b/roles/dnsmasq/templates/dnsmasq-dhcp.j2 @@ -0,0 +1,3 @@ +interface={{ if_lan }} +dhcp-range={{ dhcp_start }},{{ dhcp_stop }},2h +dhcp-generate-names diff --git a/roles/tftp-netboot-installer/templates/dnsmasq-tftp-netboot-installer.j2 b/roles/dnsmasq/templates/dnsmasq-tftp-netboot-installer.j2 similarity index 100% rename from roles/tftp-netboot-installer/templates/dnsmasq-tftp-netboot-installer.j2 rename to roles/dnsmasq/templates/dnsmasq-tftp-netboot-installer.j2 diff --git a/roles/tftp-netboot-installer/defaults/main.yml b/roles/netboot-installer/defaults/main.yml similarity index 100% rename from roles/tftp-netboot-installer/defaults/main.yml rename to roles/netboot-installer/defaults/main.yml diff --git a/roles/tftp-netboot-installer/handlers/main.yml b/roles/netboot-installer/handlers/main.yml similarity index 100% rename from roles/tftp-netboot-installer/handlers/main.yml rename to roles/netboot-installer/handlers/main.yml diff --git a/roles/tftp-netboot-installer/tasks/main.yml b/roles/netboot-installer/tasks/main.yml similarity index 78% rename from roles/tftp-netboot-installer/tasks/main.yml rename to roles/netboot-installer/tasks/main.yml index f6daa83..e2e88bc 100644 --- a/roles/tftp-netboot-installer/tasks/main.yml +++ b/roles/netboot-installer/tasks/main.yml @@ -17,14 +17,7 @@ src: /usr/share/doc/di-netboot-assistant/examples/preseed.cfg dest: "{{ tftp_root }}/d-i/{{ di_dist }}" force: no - -- 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 + remote_src: yes - name: make the hostname resolvable from the LAN replace: diff --git a/sambox.yml b/sambox.yml index c24d2ee..85560e1 100644 --- a/sambox.yml +++ b/sambox.yml @@ -18,8 +18,9 @@ ## LAN IP address range: ipaddr_lan: 192.168.0.10/24 - dhcp_range: 192.168.0.50,192.168.0.99,2h - in_inventory: 192.168.0.[50:99] + dhcp_start: 192.168.0.50 + dhcp_stop: 192.168.0.150 + in_inventory: 192.168.0.[50:150] di_dist: "{{ ansible_distribution_release }}" di_version: 10 #"{{ ansible_distribution_major_version }}" @@ -49,8 +50,8 @@ roles: - up2date-debian - two-interface-firewalld - - dhcp-dns-dnsmasq - - tftp-netboot-installer + - netboot-installer + - dns-dhcp-tftp - apt-cacher - samba-ldap - prepare4clients