add dns stuff
Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>
This commit is contained in:
parent
f2f505cfc8
commit
4b17ef07a4
3 changed files with 30 additions and 0 deletions
|
@ -3,6 +3,15 @@ ntp_servers:
|
|||
- ntp-s2-cra.ntp.k3s.fr
|
||||
- ntp-s2-ces.ntp.k3s.fr
|
||||
|
||||
dns_servers:
|
||||
- 192.168.20.3
|
||||
- 192.168.10.254
|
||||
- 1.1.1.1
|
||||
|
||||
dns_search_domains:
|
||||
- lan.k3s.fr
|
||||
- k3s.fr
|
||||
|
||||
ssh_keys:
|
||||
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQChSPXfIMvZHaK6c1mDNubZCNuR+908kzJGqQhhZ0kzjL3Gh/rdLVLBSEael2pEJeuSSA6ADHz/AneQnXqLLod1wHtirq9yspyjTRmEWNXiWI5giZ0Mz/twe4wMpBDZ8YX8XM0zxWhyzoidLI/yomA63s30v0UyzmUesSfRwHQJ3Md56pA0ZEomdMH97sNdgMOjlUlyAFdwuK8zVkbeCdbT/eCHM28PCT366KOOJfoaGQpVagIkrUBXjEvOIjnMAxy3gqfJ8kS/iFxDgws3m5o93Pm+WdWdcPLf/ir9NUwPt8l2GV2lCapWFnMC8ZqgdvTxlFikBZaTss8rO8SKB5QkG6eoypsbIaK9GGnRgOM/zGdX7e5rVW1N1Y6O8qoykuY9EQykN4Y48h1q/aGD6HGuxqeP9cqD4HUJyL9K62D3k8At6KO2BLCKbp5hPZ5tvHgfQK2ARa0rR5L/m08Hxac6qI2JDdWTa4XJnJj9+F/D7pYRZ/tzrYwMy+nTXarC5/JDsuC9sv5MR1vcjSuzjLB0iPjZnp7Tm6hszHy7D8qOZiHJdPh7s4/I3+Zj7mCaG3bRREvIgqAW1ZP+E2ZFuAM4lUL8e2Xu3LmyLOk+hrvovDc+SAplS6FJxLGJDfpFAcCgaGY6WPi8ETCClfxcdQxnejs2SNAmcRIUHw70keKHgQ== cardno:6708664
|
||||
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDDEEf2vpLMXa2o9tA3xeoPWMZ0Dk1MjIV9AOPyKT4Gi8jSovEnN+Hu1FQhODLkRx+CGkD5dV9rirbL6yD4BC9vNXoO2FeQpgRPAl1WkMpmg+AvVmroOUlsiNYCQL/F/yIAGwXiIo4mWTcsYDNngnlFkmqWzjaUG1VltmVOJtN+YVYvMj5ak/NYnFQIF7UsUZ/TRmQ9pvej2Yw001crhqe7SUfCYinJL/ynBmT/pXnd2hKJR5JSQl9uqBpsOFhPBUuShKjOMH+zc/6aM/MNEPNBnstvykztht6t4u8umu7LujcfWotwccz8rBhDSU6sIii0hbzxIeNWcM2pvNp/YtqmpEXpDJ8Yz8ffQY92lreR6picfvkqkoR+RA2uhMGP0VzajWCLPYQAHFmWOZIba6PpvJ5bkTSM+IA8U5dtBJ7l9D4vCKhUeybZUHTKL3hwxpaumu75giszKtZ15SA76QhZ5fLz+AuG2LdQwgnEgcdgLmrXXGi3/SOhvj5O9JGkrt5dIJHNo1sADulqhCLXjurlE2I55j2SloLmpduVKTUSD+OC0iTqIwzn8Sk6VVgSYfrUoZs7ySmFKG4SH+2iAcatj3z6r45y6eGqGaLdkeSFRlA6PJPuI85p6Fc44NxOEFae5wXV/G9nWHsnfZYv8cr73gaIo4duUg7fqmdjJ8BeDw== /home/frank/.ssh/id_rsa.auth
|
||||
|
|
|
@ -8,6 +8,11 @@
|
|||
name: systemd-journald
|
||||
state: restarted
|
||||
|
||||
- name: restart systemd-resolved
|
||||
systemd:
|
||||
name: systemd-resolved
|
||||
state: restarted
|
||||
|
||||
- name: restart sshd
|
||||
systemd:
|
||||
name: sshd
|
||||
|
|
16
tasks/dns.yml
Normal file
16
tasks/dns.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Set DNS server and search domain
|
||||
- name: Set DNS server
|
||||
ini_file:
|
||||
path: /etc/systemd/resolved.conf
|
||||
section: Resolve
|
||||
option: DNS
|
||||
value: "{{ vars.dns_servers | join(' ') }}"
|
||||
notify: restart systemd-resolved
|
||||
|
||||
- name: Set DNS search domain
|
||||
ini_file:
|
||||
path: /etc/systemd/resolved.conf
|
||||
section: Resolve
|
||||
option: Domains
|
||||
value: "{{ vars.dns_search_domains | join(' ') }}"
|
||||
notify: restart systemd-resolved
|
Loading…
Reference in a new issue