.
This commit is contained in:
parent
b12cea971f
commit
b196972b96
@ -1,17 +0,0 @@
|
||||
interface={{ interface }}
|
||||
listen-address= {{ ip }}
|
||||
bind-interfaces
|
||||
domain-needed
|
||||
bogus-priv
|
||||
dhcp-range={{ ip[0:-1] }}50,{{ ip[0:-1] }}150,12h
|
||||
dhcp-option=option:ntp-server,192.168.0.4,{{ ip }}
|
||||
dhcp-option=66,{{ ip }}
|
||||
enable-tftp
|
||||
tftp-root=/srv/tftpboot
|
||||
dhcp-match=set:efi-x86_64,option:client-arch,7
|
||||
dhcp-match=set:efi-x86_64,option:client-arch,9
|
||||
dhcp-match=set:efi-x86,option:client-arch,6
|
||||
dhcp-match=set:bios,option:client-arch,0
|
||||
dhcp-boot=tag:efi-x86_64,bootx64.efi
|
||||
dhcp-boot=tag:efi-x86,syslinux.efi
|
||||
dhcp-boot=tag:bios,pxelinux.0
|
@ -1,12 +0,0 @@
|
||||
except-interface={{ pillar['network']['interface']['external'] }}
|
||||
domain-needed
|
||||
bogus-priv
|
||||
enable-tftp
|
||||
tftp-root=/srv/tftpboot
|
||||
dhcp-match=set:efi-x86_64,option:client-arch,7
|
||||
dhcp-match=set:efi-x86_64,option:client-arch,9
|
||||
dhcp-match=set:efi-x86,option:client-arch,6
|
||||
dhcp-match=set:bios,option:client-arch,0
|
||||
dhcp-boot=tag:efi-x86_64,bootx64.efi
|
||||
dhcp-boot=tag:efi-x86,syslinux.efi
|
||||
dhcp-boot=tag:bios,pxelinux.0
|
@ -2,43 +2,18 @@ Install dnsmasq:
|
||||
pkg.installed:
|
||||
- name: dnsmasq
|
||||
|
||||
{% set ip = pillar['network']['ip'] -%}
|
||||
{% set interface = pillar['network']['interface']['internal'] -%}
|
||||
configure dnsmasq for internal interface:
|
||||
configure dnsmasq:
|
||||
file.managed:
|
||||
- name: /etc/dnsmasq.d/{{ interface }}.conf
|
||||
- source: salt://dnsmasq/files/dnsmasq.conf.jinja
|
||||
- name: /etc/dnsmasq.d/tlu.conf
|
||||
- source: salt://dnsmasq/files/tlu.conf.jinja
|
||||
- template: jinja
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: "0644"
|
||||
- context:
|
||||
ip: {{ ip }}
|
||||
interface: {{ interface }}
|
||||
|
||||
{% for vlan in pillar['network']['vlan'] -%}
|
||||
{% set id = vlan['id'] -%}
|
||||
{% set ip = vlan['address'] -%}
|
||||
configure dnsmasq for vlan.{{ id }}:
|
||||
file.managed:
|
||||
- name: /etc/dnsmasq.d/vlan.{{ id }}.conf
|
||||
- source: salt://dnsmasq/files/dnsmasq.conf.jinja
|
||||
- template: jinja
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: "0644"
|
||||
- context:
|
||||
ip: {{ ip }}
|
||||
interface: vlan.{{ id }}
|
||||
{% endfor %}
|
||||
|
||||
Start dnsmasq:
|
||||
service.running:
|
||||
- name: dnsmasq
|
||||
- enable: True
|
||||
- watch:
|
||||
- file: configure dnsmasq for internal interface
|
||||
{% for vlan in pillar['network']['vlan'] -%}
|
||||
{% set id = vlan['id'] -%}
|
||||
- file: configure dnsmasq for vlan.{{ id }}
|
||||
{% endfor %}
|
||||
- file: configure dnsmasq
|
||||
|
Loading…
Reference in New Issue
Block a user