Skip to content

Commit

Permalink
Update tests and docs to reflect the new modules
Browse files Browse the repository at this point in the history
  • Loading branch information
jiuka committed Jan 24, 2025
1 parent c41aa71 commit c3ea26c
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 2 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,15 @@ not implemented => development => [testing](https://github.com/ansibleguy/collec
| **ACME (Certificates)** | ansibleguy.opnsense.acme_general | [Docs](https://opnsense.ansibleguy.net/modules/acmeclient.html) | unstable |
| **ACME (Certificates)** | ansibleguy.opnsense.acme_validation | [Docs](https://opnsense.ansibleguy.net/modules/acmeclient.html) | unstable |
| **ACME (Certificates)** | ansibleguy.opnsense.acme_certificate | [Docs](https://opnsense.ansibleguy.net/modules/acmeclient.html) | unstable |

| **Postfix** | ansibleguy.opnsense.postfix_general | [Docs](https://opnsense.ansibleguy.net/modules/postfix.html) | unstable |
| **Postfix** | ansibleguy.opnsense.postfix_domain | [Docs](https://opnsense.ansibleguy.net/modules/postfix.html) | unstable |
| **Postfix** | ansibleguy.opnsense.postfix_recipient | [Docs](https://opnsense.ansibleguy.net/modules/postfix.html) | unstable |
| **Postfix** | ansibleguy.opnsense.postfix_recipientbcc | [Docs](https://opnsense.ansibleguy.net/modules/postfix.html) | unstable |
| **Postfix** | ansibleguy.opnsense.postfix_sender | [Docs](https://opnsense.ansibleguy.net/modules/postfix.html) | unstable |
| **Postfix** | ansibleguy.opnsense.postfix_senderbcc | [Docs](https://opnsense.ansibleguy.net/modules/postfix.html) | unstable |
| **Postfix** | ansibleguy.opnsense.postfix_sendercanonical | [Docs](https://opnsense.ansibleguy.net/modules/postfix.html) | unstable |
| **Postfix** | ansibleguy.opnsense.postfix_headercheck | [Docs](https://opnsense.ansibleguy.net/modules/postfix.html) | unstable |
| **Postfix** | ansibleguy.opnsense.postfix_address | [Docs](https://opnsense.ansibleguy.net/modules/postfix.html) | unstable |

### Roadmap

Expand Down
2 changes: 1 addition & 1 deletion docs/source/modules/2_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ In most cases the returned type of this module ist a list of dictionaries.
:header: "Parameter", "Type", "Required", "Default", "Aliases", "Comment"
:widths: 15 10 10 10 10 45

"target","string","true","\-","tgt, t","What part of the running config should be queried/listed. One of: 'alias', 'rule', 'route', 'cron', 'syslog', 'package', 'unbound_general', 'unbound_acl', 'unbound_host', 'unbound_dot', 'unbound_forward', 'unbound_host_alias', 'ipsec_cert', 'shaper_pipe', 'shaper_queue', 'shaper_rule', 'monit_service', 'monit_test', 'monit_alert', 'wireguard_server', 'wireguard_peer', 'interface_lagg', 'interface_vlan', 'interface_vxlan', 'source_nat', 'frr_bfd', 'frr_bgp_general', 'frr_bgp_neighbor', 'frr_bgp_prefix_list', 'frr_bgp_community_list', 'frr_bgp_as_path', 'frr_bgp_route_map', 'frr_ospf_general', 'frr_ospf_prefix_list', 'frr_ospf_interface', 'frr_ospf_route_map', 'frr_ospf_network', 'frr_ospf3_general', 'frr_ospf3_interface', 'frr_rip', 'bind_general', 'bind_blocklist', 'bind_acl', 'bind_domain', 'bind_record', 'interface_vip', 'webproxy_general', 'webproxy_cache', 'webproxy_parent', 'webproxy_traffic', 'webproxy_forward', 'webproxy_acl', 'webproxy_icap', 'webproxy_auth', 'webproxy_remote_acl', 'webproxy_pac_proxy', 'webproxy_pac_match', 'webproxy_pac_rule', 'unbound_dnsbl'"
"target","string","true","\-","tgt, t","What part of the running config should be queried/listed. One of: 'alias', 'rule', 'route', 'cron', 'syslog', 'package', 'unbound_general', 'unbound_acl', 'unbound_host', 'unbound_dot', 'unbound_forward', 'unbound_host_alias', 'ipsec_cert', 'shaper_pipe', 'shaper_queue', 'shaper_rule', 'monit_service', 'monit_test', 'monit_alert', 'wireguard_server', 'wireguard_peer', 'interface_lagg', 'interface_vlan', 'interface_vxlan', 'source_nat', 'frr_bfd', 'frr_bgp_general', 'frr_bgp_neighbor', 'frr_bgp_prefix_list', 'frr_bgp_community_list', 'frr_bgp_as_path', 'frr_bgp_route_map', 'frr_ospf_general', 'frr_ospf_prefix_list', 'frr_ospf_interface', 'frr_ospf_route_map', 'frr_ospf_network', 'frr_ospf3_general', 'frr_ospf3_interface', 'frr_rip', 'bind_general', 'bind_blocklist', 'bind_acl', 'bind_domain', 'bind_record', 'interface_vip', 'webproxy_general', 'webproxy_cache', 'webproxy_parent', 'webproxy_traffic', 'webproxy_forward', 'webproxy_acl', 'webproxy_icap', 'webproxy_auth', 'webproxy_remote_acl', 'webproxy_pac_proxy', 'webproxy_pac_match', 'webproxy_pac_rule', 'unbound_dnsbl', 'postfix_general', 'postfix_domain', 'postfix_recipient', 'postfix_recipientbcc', 'postfix_sender', 'postfix_senderbcc', 'postfix_sendercanonical', 'postfix_headercheck', 'postfix_address'"

.. include:: ../_include/param_basic.rst

Expand Down
70 changes: 70 additions & 0 deletions tests/1_cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -717,3 +717,73 @@
- 'ANSIBLE_TEST_1_9'
- 'ANSIBLE_TEST_1_10'
- 'ANSIBLE_TEST_DUMMY_1_1'

- name: Cleanup Psotfix General
ansibleguy.opnsense.postfix_general:
reload: false # speed

- name: Cleanup Postfix Address
ansibleguy.opnsense.postfix_address:
address: "{{ item }}"
state: 'absent'
loop:
- '[email protected]'
- '[email protected]'

- name: Cleanup Postfix Domain
ansibleguy.opnsense.postfix_domain:
domainname: "{{ item }}"
state: 'absent'
loop:
- 'example.com'
- 'example.net'

- name: Cleanup Postfix Headercheck
ansibleguy.opnsense.postfix_headercheck:
expression: '/^\s*User-Agent/ IGNORE'
filter: '{{ item }}'
state: 'absent'
loop:
- 'WHILE_RECEIVING'
- 'WHILE_DELIVERING'

- name: Cleanup Postfix Recipient
ansibleguy.opnsense.postfix_recipient:
address: '{{ item }}'
state: 'absent'
loop:
- '[email protected]'
- '[email protected]'

- name: Cleanup Postfix Recipient BCC
ansibleguy.opnsense.postfix_recipientbcc:
address: '{{ item }}'
state: 'absent'
loop:
- '[email protected]'
- '[email protected]'

- name: Cleanup Postfix Sender
ansibleguy.opnsense.postfix_sender:
address: '{{ item }}'
state: 'absent'
loop:
- '[email protected]'
- '[email protected]'

- name: Cleanup Postfix Sender BCC
ansibleguy.opnsense.postfix_senderbcc:
address: '{{ item }}'
state: 'absent'
loop:
- '[email protected]'
- '[email protected]'


- name: Cleanup Postfix Sender Canonical
ansibleguy.opnsense.postfix_sendercanonical:
address: '{{ item }}'
state: 'absent'
loop:
- '[email protected]'
- '[email protected]'
1 change: 1 addition & 0 deletions tests/1_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@
- 'os-frr'
- 'os-bind'
- 'os-acme-client'
- 'os-postfix'

0 comments on commit c3ea26c

Please sign in to comment.