-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
task288 - add dyndns tasks,test,handler (#97)
* task288 - add dyndns tasks,test,handler * add example vars into dyndnstask,add dyndns to test.yml, modified handler and add fake handler * task288 - makes ansible-lint happy and corrected the dyndns.yml general task * task288 - fixt test error for dyndns * requested changes in dyndns.yml, dyndns-test.xml,test.yml
- Loading branch information
Showing
7 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
# opn_dyndns_general: | ||
# settings: | ||
# - key: enabled | ||
# value: "1" | ||
# - key: verbose | ||
# value: "0" | ||
# - key: allowipv6 | ||
# value: "0" | ||
# - key: daemon_delay | ||
# value: "300" | ||
# - key: backend | ||
# value: "opnsense" | ||
# opn_dyndns_accounts: | ||
# - uuid: "8e4627c4-21ff-4252-a331-3d1adee0a023" | ||
# settings: | ||
# - key: enabled | ||
# value: "1" | ||
# - key: service | ||
# value: "testservice" | ||
# - key: protocol | ||
# value: "" | ||
# - key: server | ||
# value: "" | ||
# - key: username | ||
# value: "user" | ||
# - key: password | ||
# value: "pass" | ||
# - key: resourceId | ||
# value: "" | ||
# - key: hostnames | ||
# value: "all.ddnskey.com" | ||
# - key: wildcard | ||
# value: "0" | ||
# - key: zone | ||
# value: "" | ||
# - key: checkip | ||
# value: "web_noip-ipv4" | ||
# - key: checkip_timeout | ||
# value: "10" | ||
# - key: force_ssl | ||
# value: "1" | ||
# - key: ttl | ||
# value: "300" | ||
# - key: interface | ||
# value: "wan" | ||
# - key: description | ||
# value: "dyndns-description" | ||
|
||
- name: DynDNS - Update general DynDNS settings | ||
delegate_to: localhost | ||
community.general.xml: | ||
path: "{{ local_config_path }}" | ||
xpath: "/opnsense/OPNsense/DynDNS/general/{{ item.key }}" | ||
value: "{{ item.value }}" | ||
state: present | ||
pretty_print: true | ||
notify: restart dyndns | ||
with_items: | ||
- "{{ opn_dyndns_general }}" | ||
when: | ||
- opn_dyndns_general is defined | ||
|
||
- name: DynDNS - Apply settings for each DynDNS account | ||
delegate_to: localhost | ||
community.general.xml: | ||
path: "{{ local_config_path }}" | ||
xpath: "/opnsense/OPNsense/DynDNS/accounts/account[@uuid='{{ item.0.uuid }}']/{{ item.1.key }}" | ||
value: "{{ item.1.value }}" | ||
state: present | ||
pretty_print: true | ||
notify: restart dyndns | ||
with_subelements: | ||
- "{{ opn_dyndns_accounts }}" | ||
- settings | ||
when: | ||
- opn_dyndns_accounts is defined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<opnsense> | ||
<system> | ||
</system> | ||
<OPNsense> | ||
<DynDNS> | ||
<general> | ||
<enabled>1</enabled> | ||
<verbose>0</verbose> | ||
<allowipv6nano>0</allowipv6nano> | ||
<daemon_delay>300</daemon_delay> | ||
<backend>opnsense</backend> | ||
</general> | ||
<accounts> | ||
<account uuid="8e4627c4-21ff-4252-a331-3d1adee0a023"> | ||
<enabled>1</enabled> | ||
<service>noip</service> | ||
<protocol/> | ||
<server/> | ||
<username/> | ||
<password>user</password> | ||
<resourceId>pass</resourceId> | ||
<hostnames>all.ddnskey.com</hostnames> | ||
<wildcard>0</wildcard> | ||
<zone/> | ||
<checkip>web_noip-ipv4</checkip> | ||
<checkip_timeout>10</checkip_timeout> | ||
<force_ssl>1</force_ssl> | ||
<ttl>300</ttl> | ||
<interface>wan</interface> | ||
<description>dyndns-description</description> | ||
</account> | ||
</accounts> | ||
</DynDNS> | ||
</OPNsense> | ||
</opnsense> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<opnsense> | ||
<system> | ||
</system> | ||
<OPNsense> | ||
</OPNsense> | ||
</opnsense> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
|
||
opn_dyndns_general: | ||
- key: enabled | ||
value: "1" | ||
- key: verbose | ||
value: "0" | ||
- key: allowipv6nano | ||
value: "0" | ||
- key: daemon_delay | ||
value: "300" | ||
- key: backend | ||
value: "opnsense" | ||
opn_dyndns_accounts: | ||
- uuid: "8e4627c4-21ff-4252-a331-3d1adee0a023" | ||
settings: | ||
- key: enabled | ||
value: "1" | ||
- key: service | ||
value: "noip" | ||
- key: protocol | ||
value: "" | ||
- key: server | ||
value: "" | ||
- key: username | ||
value: "" | ||
- key: password | ||
value: "user" | ||
- key: resourceId | ||
value: "pass" | ||
- key: hostnames | ||
value: "all.ddnskey.com" | ||
- key: wildcard | ||
value: "0" | ||
- key: zone | ||
value: "" | ||
- key: checkip | ||
value: "web_noip-ipv4" | ||
- key: checkip_timeout | ||
value: "10" | ||
- key: force_ssl | ||
value: "1" | ||
- key: ttl | ||
value: "300" | ||
- key: interface | ||
value: "wan" | ||
- key: description | ||
value: "dyndns-description" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters