mirror of
https://github.com/GeekOops/geekoops-next.git
synced 2024-05-19 21:42:22 +00:00
Working prototype
This commit is contained in:
parent
c620206691
commit
be38529589
Binary file not shown.
|
@ -1,5 +1,10 @@
|
||||||
---
|
---
|
||||||
# handlers file for geekoops-next
|
# handlers file for geekoops-next
|
||||||
|
|
||||||
|
- name: restart dnsmasq
|
||||||
|
systemd:
|
||||||
|
name: "{{dnsmasq_service}}"
|
||||||
|
state: restarted
|
||||||
|
|
||||||
- name: reload firewalld
|
- name: reload firewalld
|
||||||
shell: firewall-cmd --reload
|
shell: firewall-cmd --reload
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
state: enabled
|
state: enabled
|
||||||
notify: reload firewalld
|
notify: reload firewalld
|
||||||
when: dns_port != 0
|
when: dns_port != 0
|
||||||
tags: ['firewall', 'tftp', 'dnsmasq']
|
tags: ['firewall', 'dns', 'dnsmasq']
|
||||||
- name: Ensure dhcp is open in firewall
|
- name: Ensure dhcp is open in firewall
|
||||||
firewalld:
|
firewalld:
|
||||||
zone: "{{firewall_zone}}"
|
zone: "{{firewall_zone}}"
|
||||||
|
@ -26,4 +26,13 @@
|
||||||
state: enabled
|
state: enabled
|
||||||
notify: reload firewalld
|
notify: reload firewalld
|
||||||
when: dhcp_range != ""
|
when: dhcp_range != ""
|
||||||
tags: ['firewall', 'tftp', 'dnsmasq']
|
tags: ['firewall', 'dhcp', 'dnsmasq']
|
||||||
|
- name: Ensure proxy-dhcp is open in firewall
|
||||||
|
firewalld:
|
||||||
|
zone: "{{firewall_zone}}"
|
||||||
|
service: proxy-dhcp
|
||||||
|
permanent: true
|
||||||
|
state: enabled
|
||||||
|
notify: reload firewalld
|
||||||
|
when: "'proxy' in dhcp_range"
|
||||||
|
tags: ['firewall', 'dhcp', 'dnsmasq']
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
notify: restart dnsmasq
|
||||||
|
tags: ['dnsmasq','tftp']
|
||||||
- name: Ensure pxelinux.cfg is present
|
- name: Ensure pxelinux.cfg is present
|
||||||
file:
|
file:
|
||||||
path: "{{tftp_root}}/pxelinux.cfg"
|
path: "{{tftp_root}}/pxelinux.cfg"
|
||||||
|
@ -44,6 +46,12 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
tags: ['dnsmasq','tftp']
|
tags: ['dnsmasq','tftp']
|
||||||
|
|
||||||
|
- name: Ensure dnsmasq is started and enabled
|
||||||
|
systemd:
|
||||||
|
name: "{{ dnsmasq_service }}"
|
||||||
|
state: started
|
||||||
|
enabled: true
|
||||||
|
tags: ['dnsmasq','tftp']
|
||||||
|
|
||||||
- include: firewall.yml
|
- include: firewall.yml
|
||||||
when: config_firewall == true
|
when: config_firewall == true
|
||||||
|
|
|
@ -4,11 +4,16 @@
|
||||||
## Don't manually edit it, as your changes will be overwritten! ##
|
## Don't manually edit it, as your changes will be overwritten! ##
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PORT={{dns_port}}
|
# DNS port (use 0 to disable DNS)
|
||||||
|
port={{dns_port}}
|
||||||
|
|
||||||
{% if dhcp_no_override == true %}
|
{% if dhcp_no_override == true %}
|
||||||
# Disable reuse of the DHCP servername to avoid confusion of old (and broken) clients
|
# Disable reuse of the DHCP servername to avoid confusion of old (and broken) clients
|
||||||
dhcp-no-override
|
dhcp-no-override
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if dhcp_range != "" %}
|
||||||
|
dhcp-range={{dhcp_range}}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# PXE boot menu
|
# PXE boot menu
|
||||||
dhcp-boot={{dhcp_boot}}
|
dhcp-boot={{dhcp_boot}}
|
||||||
|
@ -22,9 +27,6 @@ pxe-service=x86PC, "Legacy Network Boot", pxelinux
|
||||||
pxe-service=x86-64_EFI,"EFI Network Boot", pxelinux
|
pxe-service=x86-64_EFI,"EFI Network Boot", pxelinux
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if dhcp_range != "" %}
|
|
||||||
dhcp-range={{dhcp_range}}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
# tftp server
|
# tftp server
|
||||||
enable-tftp
|
enable-tftp
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#DEFAULT vesamenu.c32
|
DEFAULT vesamenu.c32
|
||||||
PROMPT 0
|
PROMPT 0
|
||||||
TIMEOUT 100
|
TIMEOUT 100
|
||||||
ONTIMEOUT local
|
ONTIMEOUT local
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
localhost
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
remote_user: root
|
|
||||||
roles:
|
|
||||||
- geekoops-next
|
|
|
@ -5,4 +5,7 @@
|
||||||
|
|
||||||
packages: ['dnsmasq']
|
packages: ['dnsmasq']
|
||||||
|
|
||||||
|
dnsmasq_service: "dnsmasq"
|
||||||
|
|
||||||
tftp_root: "/srv/tftpboot"
|
tftp_root: "/srv/tftpboot"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue