Skip to content

Commit

Permalink
[debops.ifupdown] Ensure that /run/network/ exists
Browse files Browse the repository at this point in the history
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 7a508d6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ansible/roles/debops.ifupdown/tasks/divert_interfaces.yml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
mode: '0644' mode: '0644'
register: ifupdown__register_main_config 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 - name: Request entire network reconfiguration
copy: copy:
content: 'init' content: 'init'
Expand Down

0 comments on commit 7a508d6

Please sign in to comment.