Commit dd750800 authored by root's avatar root

playbook/vm-bootstrap: Ensure network availability

While bootstraping a host, the network can be in unknown state, and a
lot of tasks depend on the network, thus make sure that network is
available.

By extracting the hostname task to vm-bootstrap-hostname it's possible
to setup it as a dependency role for vm-bootstrap, before package role,
which depends on the network setup.
parent 1bf5f880
- name: configuring systemd-resolved (add search)
lineinfile: dest=/etc/systemd/resolved.conf line="Domains=tl.teralab-datascience.fr"
notify: restart systemd-resolved
- name: configuring systemd-resolved (add DNS)
lineinfile: dest=/etc/systemd/resolved.conf line="DNS=10.200.218.1"
notify: restart systemd-resolved
- name: configuring systemd-resolved (no FallbackDNS)
lineinfile: dest=/etc/systemd/resolved.conf line="FallbackDNS="
notify: restart systemd-resolved
- name: Ensure resolved is restarted
meta: flush_handlers
---
dependencies:
- { role: vm-bootstrap-hostname }
- { role: package, package_name: python3, package_state: present }
......@@ -42,7 +42,6 @@
register: upgrade_needed
- include: network.yml
- include: hostname.yml
- include: user.yml
- include: ssh.yml
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment