system.resolv.yml
497 Bytes
---
# playbook files for configure linux /etc/resove.conf
# author: chunhua.zhang
- 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