java-resolv.yml
452 Bytes
---
# playbook files for hosts resolv
- hosts: "{{ group }}"
remote_user: root
vars:
nameserver_timeout: 1
tasks:
# 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