Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
slapos.package
Commits
7b4a8ed7
Commit
7b4a8ed7
authored
Dec 14, 2021
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Configure systemd-resolved when present
parent
3c4c9495
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
11 deletions
+28
-11
playbook/roles/vm-bootstrap/handlers/main.yml
playbook/roles/vm-bootstrap/handlers/main.yml
+3
-0
playbook/roles/vm-bootstrap/tasks/hostname.yml
playbook/roles/vm-bootstrap/tasks/hostname.yml
+4
-11
playbook/roles/vm-bootstrap/tasks/resolv_conf.yml
playbook/roles/vm-bootstrap/tasks/resolv_conf.yml
+12
-0
playbook/roles/vm-bootstrap/tasks/resolv_conf_systemd.yml
playbook/roles/vm-bootstrap/tasks/resolv_conf_systemd.yml
+9
-0
No files found.
playbook/roles/vm-bootstrap/handlers/main.yml
View file @
7b4a8ed7
...
...
@@ -7,3 +7,6 @@
-
name
:
restart sshd
service
:
name=sshd state=restarted
when
:
ansible_os_family == "RedHat"
-
name
:
restart systemd-resolved
service
:
name=systemd-resolved state=restarted
playbook/roles/vm-bootstrap/tasks/hostname.yml
View file @
7b4a8ed7
...
...
@@ -53,18 +53,11 @@
script
:
format_hosts /tmp/hosts tl.teralab-datascience.fr
when
:
cluster_hash.stat.exists == True
-
name
:
managing resolv.conf file
lineinfile
:
dest=/etc/resolv.conf line="search tl.teralab-datascience.fr"
-
include
:
resolv_conf.yml
when
:
ansible_distribution != "Ubuntu" or ansible_distribution_major_version|int <
18
-
name
:
adding entry from workspace
lineinfile
:
dest=/etc/resolv.conf line="nameserver 10.200.218.1"
-
name
:
Delete default nameserver
lineinfile
:
dest=/etc/resolv.conf line="nameserver 10.0.2.3" state=absent
-
name
:
Delete nameserver 8.8.8.8
lineinfile
:
dest=/etc/resolv.conf line="nameserver 8.8.8.8" state=absent
when
:
is_playbook_ok in [False, "False"]
-
include
:
resolv_conf_systemd.yml
when
:
ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int >=
18
-
name
:
Turn off dhclient if it's running
shell
:
pkill dhclient
...
...
playbook/roles/vm-bootstrap/tasks/resolv_conf.yml
0 → 100644
View file @
7b4a8ed7
-
name
:
managing resolv.conf file
lineinfile
:
dest=/etc/resolv.conf line="search tl.teralab-datascience.fr"
-
name
:
adding entry from workspace
lineinfile
:
dest=/etc/resolv.conf line="nameserver 10.200.218.1"
-
name
:
Delete default nameserver
lineinfile
:
dest=/etc/resolv.conf line="nameserver 10.0.2.3" state=absent
-
name
:
Delete nameserver 8.8.8.8
lineinfile
:
dest=/etc/resolv.conf line="nameserver 8.8.8.8" state=absent
when
:
is_playbook_ok in [False, "False"]
playbook/roles/vm-bootstrap/tasks/resolv_conf_systemd.yml
0 → 100644
View file @
7b4a8ed7
-
name
:
configuring systemd-resolved (add search)
lineinfile
:
dest=/etc/systemd/resolved.conf line="Domains=tl.teralab-datascience.fr"
-
name
:
configuring systemd-resolved (add DNS)
lineinfile
:
dest=/etc/systemd/resolved.conf line="DNS=10.200.218.1"
-
name
:
configuring systemd-resolved (no FallbackDNS)
lineinfile
:
dest=/etc/systemd/resolved.conf line="FallbackDNS="
notify
:
restart systemd-resolved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment