Browse Source

Make sure python{,3}-ipaddress packet are install on every node

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Maximilian Wilhelm 3 years ago
parent
commit
d961442019
1 changed files with 10 additions and 3 deletions
  1. 10 3
      network/interfaces/base.sls

+ 10 - 3
network/interfaces/base.sls

@@ -9,8 +9,15 @@ ifupdown2:
 
 # 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
+python-network-pkgs:
+  pkg.installed:
+    - pkgs:
+{% if grains.oscodename == "buster" %}
+      - python3-ipaddress
+{% else %}
+      - python-ipaddress
+{% endif %}
+
 
 # ifupdown2 configuration
 /etc/network/ifupdown2/ifupdown2.conf:
@@ -20,7 +27,7 @@ python-ipcalc:
       - salt://network/ifupdown2.conf
     - require:
       - pkg: ifupdown2
-      - pkg: python-ipcalc
+      - pkg: python-network-pkgs
 
 
 # Write network configuration