diff --git a/tasks/lxc_net.yml b/tasks/lxc_net.yml index 71759141..640fa13e 100644 --- a/tasks/lxc_net.yml +++ b/tasks/lxc_net.yml @@ -41,7 +41,7 @@ tags: - lxc-net -# All installations of LXC on init based systems (upstart primarily) will need to have the +# All installations of LXC will need to have the # the lxc-net service override in place to ensure its not restarted on system boot - name: Drop lxc-net override file for upstart template: @@ -56,6 +56,17 @@ - lxc-files - lxc-net +- name: Mask lxc-net systemd service + file: + src: /dev/null + path: /etc/systemd/system/lxc-net.service + state: link + when: + - pid1_name == "systemd" + tags: + - lxc-files + - lxc-net + # All Debian based systems use the interfaces.d directory for extra network configs # this check ensures the needed source line is in the base config file - name: Ensure networking includes interfaces.d