Skip to content
Permalink
Browse files

[debops.ifupdown] Ensure that /run/network/ exists

The '/run/network/' directory might not be present on hosts that don't
use ifupdown as their network configuration manager (for example recent
Ubuntu releases). Ensuring that the directory exists allows the role to
tell the ifup reconfiguration script to reconfigure all network
interfaces during initial setup.
  • Loading branch information...
drybjed committed Oct 6, 2019
1 parent 6c00541 commit 7a508d6ea4ba3c6b0f366385f895da7a51ad6277
Showing with 8 additions and 0 deletions.
  1. +8 −0 ansible/roles/debops.ifupdown/tasks/divert_interfaces.yml
@@ -30,6 +30,14 @@
mode: '0644'
register: ifupdown__register_main_config

- name: Ensure that runtime directory exists
file:
path: '/run/network'
state: 'directory'
mode: '0755'
when: (ifupdown__register_divert is changed or
ifupdown__register_main_config is changed)

- name: Request entire network reconfiguration
copy:
content: 'init'

0 comments on commit 7a508d6

Please sign in to comment.
You can’t perform that action at this time.