Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3751452
D2309.id5817.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D2309.id5817.diff
View Options
diff --git a/roles/core/network/files/Debian/10-gre.jinja b/roles/core/network/files/Debian/10-gre.jinja
new file mode 100755
--- /dev/null
+++ b/roles/core/network/files/Debian/10-gre.jinja
@@ -0,0 +1,21 @@
+# -------------------------------------------------------------
+# Network — interfaces configuration
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/core/network/files/FreeBSD/10-gre.jinja
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+auto {{ interface }}
+iface {{ interface }} inet static
+address {{ src }}
+netmask {{ netmask }}
+pre-up ip tunnel add {{ interface }} mode gre remote {{ icann_dst }} local {{ icann_src }} ttl 255
+up ip link set mtu 1500 dev {{ interface }}
diff --git a/roles/core/network/gre.sls b/roles/core/network/gre.sls
--- a/roles/core/network/gre.sls
+++ b/roles/core/network/gre.sls
@@ -36,6 +36,23 @@
icann_dst: {{ salt['node.get']('network', tunnel['to'])['ipv4_address'] }}
{% endif %}
+{% if grains['os_family'] == 'Debian' %}
+/etc/network/interfaces.d/10-gre-{{ description }}:
+ file.managed:
+ - source: salt://roles/core/network/files/Debian/10-gre.jinja
+ - makedirs: True
+ - template: jinja
+ - context:
+ interface: gre-{{ description }}
+
+ src: {{ tunnel_network['addr'][grains['id']] }}
+ dst: {{ tunnel_network['addr'][tunnel['to']] }}
+ netmask: {{ tunnel_network['netmask'] }}
+
+ icann_src: {{ network['ipv4_address'] }}
+ icann_dst: {{ salt['node.get']('network', tunnel['to'])['ipv4_address'] }}
+{% endif %}
+
{% endfor %}
# -------------------------------------------------------------
@@ -53,4 +70,10 @@
if_gre_load="YES"
{% endif %}
+{% if grains['os_family'] == 'Debian' %}
+ip_gre:
+ kmod.present:
+ - persist: True
+{% endif %}
+
{% endif %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 08:52 (21 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2250499
Default Alt Text
D2309.id5817.diff (2 KB)
Attached To
Mode
D2309: Provide GRE tunnels for Debian
Attached
Detach File
Event Timeline
Log In to Comment