Skip to content
Snippets Groups Projects
Unverified Commit a42fa971 authored by Imran Iqbal's avatar Imran Iqbal
Browse files

feat(wait_online): use separate `enabled` & `running` states

parent 10a6c241
Branches
Tags
No related merge requests found
......@@ -25,7 +25,7 @@ systemd:
fileattr: {}
path: /etc/systemd/network
service: systemd-networkd
wait_online: true
wait_online: false
resolved:
config_source: file
......
......@@ -2,6 +2,7 @@
{%- from "systemd/libtofs.jinja" import files_switch with context -%}
{%- set networkd = systemd.get('networkd', {}) %}
{%- set service_wait_online = 'systemd-networkd-wait-online' %}
networkd:
{%- if networkd.pkg %}
......@@ -31,8 +32,11 @@ networkd:
- enable: True
{%- if networkd.wait_online %}
wait_online-service-enabled:
service.enabled:
- name: {{ service_wait_online }}
wait_online:
service.running:
- name: systemd-networkd-wait-online
- enable: True
- name: {{ service_wait_online }}
{%- endif %}
......@@ -7,15 +7,24 @@
# Only add an `osfinger` which is/will be supported by the formula
# (empty `osfinger`s do not need to be listed, just added here as an example).
---
# os_family/os: Debian/Debian
Debian-9:
networkd:
wait_online: true
# os_family/os: RedHat/CentOS
CentOS Linux-7:
pkgs_extra:
- systemd-python
networkd:
wait_online: true
# os_family/os: RedHat/Amazon
Amazon Linux-2:
pkgs_extra:
- systemd-python
networkd:
wait_online: true
# os_family/os: RedHat/OEL
Oracle Linux Server-7:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment