CSC Ansible Playbooks
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
680 B

- hosts: all
become: yes
- name: Disable resolvconf
service: name={{ item }} state=stopped enabled=no
- resolvconf
- systemd-resolved
ignore_errors: yes
- name: Remove resolvconf
name: resolvconf
state: absent
- name: Remove immutable on resolv.conf
command: chattr -i /etc/resolv.conf
- name: Copy resolv.conf
src: resolv.conf
dest: /etc/resolv.conf
# attributes: 'ie'
- name: Set immutable on resolv.conf
command: chattr +i /etc/resolv.conf