Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3764163
D3385.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3385.diff
View Options
diff --git a/_modules/node.py b/_modules/node.py
--- a/_modules/node.py
+++ b/_modules/node.py
@@ -231,6 +231,18 @@
return "wwwroot/{1}/{0}".format(".".join(fqdn[0:-2]), ".".join(fqdn[-2:]))
+def has_interface_flag(flag, nodename=None):
+ interfaces = _get_property("network:interfaces", nodename, None)
+
+ return any(
+ [
+ flag in interface["flags"]
+ for interface in interfaces.values()
+ if "flags" in interface
+ ]
+ )
+
+
def get_ipv6_list():
"""
A function to get a list of IPv6, enclosed by [].
diff --git a/pillar/nodes/nodes.sls b/pillar/nodes/nodes.sls
--- a/pillar/nodes/nodes.sls
+++ b/pillar/nodes/nodes.sls
@@ -240,9 +240,9 @@
address: 2001:41d0:303:d971::517e:c0de
gateway: 2001:41d0:303:d9ff:ff:ff:ff:ff
prefix: 64
-
- fixes:
- hello_ipv6_ovh: True
+ flags:
+ - ipv4_ovh_failover
+ - hello_ipv6_ovh
ysul:
forest: nasqueron-dev
diff --git a/roles/core/network/ipv6_fixes.sls b/roles/core/network/ipv6_fixes.sls
--- a/roles/core/network/ipv6_fixes.sls
+++ b/roles/core/network/ipv6_fixes.sls
@@ -37,7 +37,7 @@
# announced.
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{% if salt['node.has']('fixes:hello_ipv6_ovh') %}
+{% if salt["node.has_interface_flag"]("hello_ipv6_ovh") %}
/usr/local/etc/cron.d/hello-ipv6:
file.managed:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 04:26 (17 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2257153
Default Alt Text
D3385.diff (1 KB)
Attached To
Mode
D3385: Switch from fixes to flags in node pillar
Attached
Detach File
Event Timeline
Log In to Comment