File tree Expand file tree Collapse file tree 7 files changed +86
-0
lines changed
environments/development/host_vars Expand file tree Collapse file tree 7 files changed +86
-0
lines changed Original file line number Diff line number Diff line change 7
7
ansible_host: 192.168.60.10 # EPOS-MSL host
8
8
ansible_user: vagrant # Administrative user on instance for Ansible
9
9
ansible_ssh_private_key_file: vagrant/ssh/vagrant # Path to private key file of administrative user
10
+ commons_use_google_dns: true
10
11
11
12
#########################
12
13
# EPOS-MSL configuration
Original file line number Diff line number Diff line change
1
+ ---
2
+ # copyright Utrecht University
3
+
4
+ commons_use_google_dns : false
Original file line number Diff line number Diff line change
1
+ # This file is part of systemd.
2
+ #
3
+ # systemd is free software; you can redistribute it and/or modify it
4
+ # under the terms of the GNU Lesser General Public License as published by
5
+ # the Free Software Foundation; either version 2.1 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # Entries in this file show the compile time defaults.
9
+ # You can change settings by editing this file.
10
+ # Defaults can be restored by simply deleting this file.
11
+ #
12
+ # See resolved.conf(5) for details
13
+
14
+ [Resolve]
15
+ DNS=8.8.8.8
16
+ FallbackDNS=8.8.4.4
17
+ #Domains=
18
+ #LLMNR=no
19
+ #MulticastDNS=no
20
+ #DNSSEC=no
21
+ #DNSOverTLS=no
22
+ #Cache=no-negative
23
+ #DNSStubListener=yes
24
+ #ReadEtcHosts=yes
Original file line number Diff line number Diff line change 5
5
ansible.builtin.service :
6
6
name : firewalld
7
7
state : restarted
8
+
9
+
10
+ - name : Restart systemd-resolved
11
+ ansible.builtin.service :
12
+ name : systemd-resolved
13
+ state : restarted
Original file line number Diff line number Diff line change
1
+ ---
2
+ # copyright Utrecht University
3
+
4
+ - name : Update systemd-resolved config to use Google DNS servers
5
+ ansible.builtin.copy :
6
+ src : files/resolved.conf
7
+ dest : /etc/systemd/resolved.conf
8
+ owner : root
9
+ group : root
10
+ mode : " 0644"
11
+ notify : Restart systemd-resolved
12
+
13
+
14
+ - name : Flush handlers for immediate effect of changing DNS configuration
15
+ ansible.builtin.meta : flush_handlers
Original file line number Diff line number Diff line change 1
1
---
2
2
# copyright Utrecht University
3
3
4
+ - name : Update local DNS settings
5
+ ansible.builtin.import_tasks : google_dns.yml
6
+ when : commons_use_google_dns
4
7
- name : Run apt update
5
8
ansible.builtin.import_tasks : apt_update.yml
6
9
- name : Configure firewall
Original file line number Diff line number Diff line change 4
4
set -e
5
5
set -x
6
6
7
+ # Configure VM to use Google DNS servers - the default configuration
8
+ # does not work reliably on Windows.
9
+
10
+ cat << RESOLVEDCONF > resolved.conf
11
+ # This file is part of systemd.
12
+ #
13
+ # systemd is free software; you can redistribute it and/or modify it
14
+ # under the terms of the GNU Lesser General Public License as published by
15
+ # the Free Software Foundation; either version 2.1 of the License, or
16
+ # (at your option) any later version.
17
+ #
18
+ # Entries in this file show the compile time defaults.
19
+ # You can change settings by editing this file.
20
+ # Defaults can be restored by simply deleting this file.
21
+ #
22
+ # See resolved.conf(5) for details
23
+
24
+ [Resolve]
25
+ DNS=8.8.8.8
26
+ FallbackDNS=8.8.4.4
27
+ #Domains=
28
+ #LLMNR=no
29
+ #MulticastDNS=no
30
+ #DNSSEC=no
31
+ #DNSOverTLS=no
32
+ #Cache=no-negative
33
+ #DNSStubListener=yes
34
+ #ReadEtcHosts=yes
35
+ RESOLVEDCONF
36
+
37
+ sudo cp resolved.conf /etc/systemd
38
+ sudo systemctl restart systemd-resolved
39
+
7
40
sudo apt update
8
41
9
42
# Install Git if not present.
You can’t perform that action at this time.
0 commit comments