-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig-dns-clients.yml
38 lines (32 loc) · 983 Bytes
/
config-dns-clients.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
- name: config dns clients
hosts: dns_clients
become: yes
tasks:
- name: configure reslov.conf for manual update
template:
src: ../lab4/90-dns-none.conf
dest: /etc/NetworkManager/conf.d/
owner: root
group: root
mode: '0644'
- name: reload NetManager
command:
cmd: systemctl reload NetworkManager
- name: Add the new nameserver to clients
ansible.builtin.lineinfile:
path: /etc/resolv.conf
line: nameserver 192.168.7.2
insertbefore: BOF
- name: config. firewalld for ens224
firewalld:
zone: internal
interface: ens224
state: enabled
permanent: yes
immediate: yes
#commands for testing and excecution
# ansible-playbook --syntax-check config-dns-clients.yml
# ansible-playbook --list-tasks config-dns-clients.yml
# ansible-playbook --check config-dns-clients.yml
# ansible-playbook config-dns-clients.yml