forked from LibreSchool/server-config
22 lines
799 B
YAML
22 lines
799 B
YAML
|
---
|
||
|
# DHCP
|
||
|
- name: Checking DHCP configuration
|
||
|
shell: /sbin/e-smith/db dhcp getprop {{ intnic }} DhcpRangeStart
|
||
|
ignore_errors: true
|
||
|
register: chk_dhcp
|
||
|
|
||
|
- name: Configuring DHCP
|
||
|
shell: /sbin/e-smith/db dhcp set {{ intnic }} range DhcpRangeStart {{ ansible_local.domain.dhcprange_start }} DhcpRangeEnd {{ ansible_local.domain.dhcprange_end }} DhcpDNS {{ ansible_local.domain.serverip }} DhcpDomain {{ ansible_local.domain.domainfull }} DhcpGatewayIP {{ ansible_local.domain.servergw }} DhcpLeaseTime 86400 DhcpNTP {{ ansible_local.domain.serverip }} status enabled
|
||
|
when: chk_dhcp|failed
|
||
|
|
||
|
- name: Activating DHCP
|
||
|
shell: /sbin/e-smith/signal-event nethserver-dnsmasq-save
|
||
|
when: chk_dhcp|failed
|
||
|
|
||
|
# Avahi
|
||
|
|
||
|
- name: Installing avahi-daemon
|
||
|
yum:
|
||
|
name: nethserver-avahi
|
||
|
state: present
|