Merge branch 'nm' into 'master'
NetworkManager
support for option to disable NetworkManager service.
(on some _servers_ you need to do it for some kinds of configuration)
tested on Ubuntu & Centos
See merge request !12
diff --git a/README.rst b/README.rst
index 68390d7..5ff855a 100644
--- a/README.rst
+++ b/README.rst
@@ -226,7 +226,7 @@
- 8.8.4.4
mtu: 1500
-Linux with bonded interfaces
+Linux with bonded interfaces and disabled NetworkManager
.. code-block:: yaml
@@ -249,6 +249,8 @@
use_in:
- interface: ${linux:interface:eth0}
- interface: ${linux:interface:eth0}
+ network_manager:
+ disable: true
Linux with vlan interface_params
diff --git a/linux/network/interface.sls b/linux/network/interface.sls
index 9d22a90..955d06e 100644
--- a/linux/network/interface.sls
+++ b/linux/network/interface.sls
@@ -20,10 +20,6 @@
{%- endif %}
-{%- if not network.network_manager %}
-
-{# TODO stop/disable/uninstall network manager #}
-
{%- for interface_name, interface in network.interface.iteritems() %}
{%- if interface.get('managed', True) %}
@@ -215,4 +211,8 @@
{%- endif %}
+{%- if network.network_manager.disable is defined and network.network_manager.disable == True %}
+NetworkManager:
+ service.dead:
+ - enable: false
{%- endif %}