Comments (4)
Can you share your config.xml file? Or at least all of the interface definitions?
from ansible-pfsense.
Of course:
Interface in config.xml
<interfaces>
<wan>
<if>lagg0.4090</if>
<switchif>switch0.port1</switchif>
<descr><![CDATA[WAN]]></descr>
<spoofmac></spoofmac>
<enable></enable>
<ipaddr>151.25.19.10</ipaddr>
<subnet>29</subnet>
<gateway>WANGW1</gateway>
</wan>
<lan>
<enable></enable>
<if>lagg0.4091</if>
<descr><![CDATA[LAN]]></descr>
<ipaddr>10.0.5.34</ipaddr>
<subnet>27</subnet>
<spoofmac></spoofmac>
</lan>
<opt1>
<enable></enable>
<if>ix0</if>
<descr><![CDATA[OPT1]]></descr>
</opt1>
<opt2>
<enable></enable>
<if>ix1</if>
<descr><![CDATA[OPT2]]></descr>
</opt2>
</interfaces>
and virtual IP part:
<virtualip>
<vip>
<mode>carp</mode>
<interface>wan</interface>
<vhid>90</vhid>
<advskew>100</advskew>
<advbase>1</advbase>
<password><![CDATA[123456]]></password>
<uniqid>5f0eebd19b2ea</uniqid>
<descr><![CDATA[WAN CARP IP]]></descr>
<type>single</type>
<subnet_bits>29</subnet_bits>
<subnet>151.25.19.11</subnet>
</vip>
</virtualip>
from ansible-pfsense.
I have been running with this patch to pfsensible.core:
diff --git a/ansible/collections/ansible_collections/pfsensible/core/plugins/module_utils/__impl/interfaces.py b/ansib
le/collections/ansible_collections/pfsensible/core/plugins/module_utils/__impl/interfaces.py
index fb3e4b9e..1d142e8a 100644
--- a/ansible/collections/ansible_collections/pfsensible/core/plugins/module_utils/__impl/interfaces.py
+++ b/ansible/collections/ansible_collections/pfsensible/core/plugins/module_utils/__impl/interfaces.py
@@ -119,6 +119,18 @@ def parse_interface(self, interface, fail=True, with_virtual=True):
elif self.is_interface_port(interface):
return interface
+ # https://github.com/opoplawski/ansible-pfsense/issues/57
+ if interface.lower().startswith("vip:"):
+ virtualips = self.get_element('virtualip')
+ if virtualips is not None:
+ for vip_elt in virtualips:
+ descr_elt = vip_elt.find('descr')
+ if descr_elt is not None:
+ if descr_elt.text.strip().lower() == interface.lower()[4:]:
+ uniqid_elt = vip_elt.find('uniqid')
+ if uniqid_elt is not None:
+ return "_vip" + uniqid_elt.text.strip()
+
It allows you to provide vip:name_of_vip
as ipsec_interface. I have no idea if that is the right way to solve the problem.
from ansible-pfsense.
This is hopefully fixed in current master with cc083a7. Please test it out and report back. Thank you for the report and suggestion.
from ansible-pfsense.
Related Issues (20)
- Calling the plugin breaks special XML fields which use CDATA and contain ampersands HOT 4
- Managing DHCP and unbound - any plans? HOT 4
- Modules list error in main README.md ? HOT 1
- Feature Request: Provide interface update HOT 1
- Ansible - Error using privilege escalation HOT 1
- pfsense 2.5 Support? HOT 25
- using ca module in pfsense 2.5 HOT 1
- pfsensible.core not compatible with ansible.netcommon 2.0.0 HOT 1
- diff['before'] is equal to diff['after'] HOT 1
- Retire this repo HOT 5
- pfsense_vlan.py error on 2.5.1 HOT 5
- Problem with pfsense_authserver_ldap module - automatically change LDAP config ? HOT 2
- pfsense_ipsec_p2 module overwriting other p2 interfaces in 2.5.2 HOT 1
- pfsense_aggregate: module failuer when try to use non-default gateway with the rule
- cannot add vlan interface HOT 1
- can we have a backup option on this ansible modules HOT 1
- Rule add issue when alias list is empty -> TypeError: 'NoneType' object is not iterable HOT 1
- pfsense_interface module cannot remove a subinterface HOT 1
- ERROR! 'pfsense_rule' is not a valid attribute for a Play HOT 1
- Not a problem - just wondering if there is a way to print a list of users by group? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-pfsense.