--- # Installing and configuring DHCP and DNS - name: Installing DHCP and DNS related NethServer packages. yum: name: nethserver-dnsmasq state: present # 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 }} status enabled when: chk_dhcp|failed - name: Activating DHCP shell: /sbin/e-smith/signal-event nethserver-dnsmasq-save when: chk_dhcp|failed # DNS # Already preconfigured before (roles/nethcfg/tasks/base.yml) # Avahi - name: Installing avahi-daemon yum: name: nethserver-avahi state: present