Browse Source

Install python-ipcalc package with network.interfaces state.

  Allthough python-ipcalc isn't needed for network.interfaces itself it is used
  by some users of the ffho_net module. As it's not a big dependency install it
  everywhere to simplify things.

  Currently the ipcalc module is used by functions in the ffho_net module used
  by the bird and dhcp-server state.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Maximilian Wilhelm 7 years ago
parent
commit
c60e3239b7
2 changed files with 6 additions and 5 deletions
  1. 1 5
      bird/init.sls
  2. 5 0
      network/interfaces/init.sls

+ 1 - 5
bird/init.sls

@@ -22,6 +22,7 @@ bird-pkg:
     - name: bird
     - require:
       - pkgrepo: bird-repo
+      - state: network.interfaces
 
 
 # Make sure both services are enabled
@@ -228,9 +229,6 @@ bird6-configure:
 # FFRL-exit
 #
 {% if 'ffrl-exit' in roles %}
-python-ipcalc:
-  pkg.installed
-
 /etc/bird/bird.d/ffrl.conf:
   file.managed:
     - source: salt://bird/ffrl.conf
@@ -240,7 +238,6 @@ python-ipcalc:
       - cmd: bird-configure
     - require:
       - file: /etc/bird/bird.d
-      - pkg: python-ipcalc
     - require_in:
       - service: bird
 
@@ -253,7 +250,6 @@ python-ipcalc:
       - cmd: bird6-configure
     - require:
       - file: /etc/bird/bird6.d
-      - pkg: python-ipcalc
     - require_in:
       - service: bird6
 

+ 5 - 0
network/interfaces/init.sls

@@ -5,6 +5,10 @@
 ifupdown2:
   pkg.installed
 
+# Require for some functions of ffho_net module, so make sure they are present.
+# Used by functions for bird and dhcp-server for example.
+python-ipcalc:
+  pkg.installed
 
 # ifupdown2 configuration
 /etc/network/ifupdown2/ifupdown2.conf:
@@ -12,6 +16,7 @@ ifupdown2:
     - source: salt://network/ifupdown2.conf
     - require:
       - pkg: ifupdown2
+      - pkg: python-ipcalc
 
 
 # Write network configuration