---
# This role deals only with specific DNS server setup

- become: true
  block:

  - name: Install dnsmasq and bind-utils
    yum:
      name: "{{ item }}"
      state: present
    with_items:
      - dnsmasq
      - bind-utils

  - name: Configure - change cache size
    lineinfile:
      dest: /etc/dnsmasq.conf
      regexp: '^#cache-size=.[0-9]*$'
      line: 'cache-size=1500'
      backrefs: yes

  - name: Start and enable dnsmasq service
    systemd:
      name: dnsmasq
      state: started
      enabled: yes

- name: Test that the server works
  command: "dig @{{ dns_external_network_ip }} docker.io"

Add role to setup the DNS server
Add role to setup the DNS server

This role contains the actions required to set up and test
the DNS service on the server once it is provisioned
and basic setup has already run.

This role would be called by the workflow in
https://review.rdoproject.org/r/#/c/12777.

Depends-On: Iccfc82e20261c6f06af9360a3d1634d3934902cd
Change-Id: Ice75cb9366014d9fd8d85525c05162a79fa75e40
