main.yml
331 Bytes
---
# Configure resolv.conf
# make sure group exists
- name: make sure nameserver groups exist in inventory file
fail:
msg: "group {{ item }} not exist!"
when: item not in groups
with_items:
- nameservers
- name: Configure resolv.conf
template:
src: resolv.conf.j2
dest: /etc/resolv.conf
mode: 0644