Skip to content

Commit

Permalink
updated install-notes
Browse files Browse the repository at this point in the history
  • Loading branch information
ansibleguy committed Dec 20, 2023
1 parent c8eca42 commit 6ee6a65
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 15 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ ansible-galaxy collection install git+https://github.com/ansibleguy/collection_o
ansible-galaxy collection install git+https://github.com/ansibleguy/collection_opnsense.git,1.2.7
## OR
ansible-galaxy collection install ansibleguy.opnsense

# install to specific directory for easier development
cd $PLAYBOOK_DIR
ansible-galaxy collection install git+https://github.com/ansibleguy/collection_opnsense.git -p ./collections
```

----
Expand Down
2 changes: 1 addition & 1 deletion docs/source/modules/2_reload.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This module can reload the running/loaded configuration for a specified part of

Most modules of this collection will automatically reload its relevant running config on change - but you can speed up mass-management of items when disabling reload on single module-calls (*reload: false*), and do it afterward using THIS module.

Alternatively you can use the :ref:`ansibleguy.opnsense.service <modules_service>` module with action 'reload' if you like it better.
Alternatively you can use the :ref:`ansibleguy.opnsense.service <modules_service>` module with action :code:`reload` if you like it better.

Definition
**********
Expand Down
2 changes: 1 addition & 1 deletion docs/source/modules/unbound_acl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The configured lists are matched by its unique file-name.

.. warning::

Unbound service actions like 'reload' can take very long (>90s). Please be aware of the **possible downtime**!
Unbound service actions like :code:`reload` can take very long (>90s). Please be aware of the **possible downtime**!

You may also need to increase the module :code:`timeout`.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/modules/unbound_domain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Entries like these override an entire domain by specifying an authoritative DNS

.. warning::

Unbound service actions like 'reload' can take very long (>90s). Please be aware of the **possible downtime**!
Unbound service actions like :code:`reload` can take very long (>90s). Please be aware of the **possible downtime**!

You may also need to increase the module :code:`timeout`.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/modules/unbound_dot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ This module manages DNS-over-TLS configuration that can be found in the WEB-UI m

.. warning::

Unbound service actions like 'reload' can take very long (>90s). Please be aware of the **possible downtime**!
Unbound service actions like :code:`reload` can take very long (>90s). Please be aware of the **possible downtime**!

You may also need to increase the module :code:`timeout`.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/modules/unbound_forwarding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This module manages DNS-Forwardings that can be found in the WEB-UI menu: 'Servi

.. warning::

Unbound service actions like 'reload' can take very long (>90s). Please be aware of the **possible downtime**!
Unbound service actions like :code:`reload` can take very long (>90s). Please be aware of the **possible downtime**!

You may also need to increase the module :code:`timeout`.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/modules/unbound_general.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This module requires OPNsense 23.7 or later.

## Info

**WARNING:** Unbound service actions like 'reload' can take very long (>90s). Please be aware of the **possible downtime**!
**WARNING:** Unbound service actions like :code:`reload` can take very long (>90s). Please be aware of the **possible downtime**!


You may also need to increase the module `timeout`.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/modules/unbound_host.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Keep in mind that all resource record types (i.e. A, AAAA, MX, etc. records) of

.. warning::

Unbound service actions like 'reload' can take very long (>90s). Please be aware of the **possible downtime**!
Unbound service actions like :code:`reload` can take very long (>90s). Please be aware of the **possible downtime**!

You may also need to increase the module :code:`timeout`.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/modules/unbound_host_alias.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Keep in mind that all resource record types (i.e. A, AAAA, MX, etc. records) of

.. warning::

Unbound service actions like 'reload' can take very long (>90s). Please be aware of the **possible downtime**!
Unbound service actions like :code:`reload` can take very long (>90s). Please be aware of the **possible downtime**!

You may also need to increase the module :code:`timeout`.

Expand Down
6 changes: 3 additions & 3 deletions docs/source/usage/3_troubleshoot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

If you get error messages - you should at first check if there are any errors listed.

Sometimes the error message can be pretty long, therefore you might want to copy its output into an editor of your choice and Strg+F/search for the terms 'Error:' or '_content'!
Sometimes the error message can be pretty long, therefore you might want to copy its output into an editor of your choice and Strg+F/search for the terms :code:`Error:` or :code:`_content`!

Per example:

.. code-block:: bash
# OUTPUT:
fatal: [localhost]: FAILED! => {"changed": false, "msg": "API call failed | Error: {'rule.interface': 'option not in list'} | Response: {'status_code': 200, 'headers': Headers({'content-type': 'application/json; charset=UTF-8', 'content-length': '73', 'date': 'Tue, 30 Aug 2022 15:17:57 GMT', 'server': 'OPNsense'}), '_request': <Request('POST', 'https://FIREWALL/api/firewall/filter/addRule')>, 'next_request': None, 'extensions': {'http_version': b'HTTP/1.1', 'reason_phrase': b'OK', 'network_stream': <httpcore.backends.sync.SyncStream object at 0x7f7efa1975b0>}, 'history': [], 'is_closed': True, 'is_stream_consumed': True, 'default_encoding': 'utf-8', 'stream': <httpx._client.BoundSyncStream object at 0x7f7efa1b28e0>, '_num_bytes_downloaded': 73, '_decoder': <httpx._decoders.IdentityDecoder object at 0x7f7efa139190>, '_elapsed': datetime.timedelta(microseconds=189718), '_content': b'{\"result\":\"failed\",\"validations\":{\"rule.interface\":\"option not in list\"}}', '_encoding': 'UTF-8', '_text': '{\"result\":\"failed\",\"validations\":{\"rule.interface\":\"option not in list\"}}'}"}
fatal: [localhost]: FAILED! => {"changed": false, "msg": "API call failed | Error: {'rule.interface': 'option not in list'} | Response: {'status_code': 200, '_request': <Request('POST', 'https://FIREWALL/api/firewall/filter/addRule')>, '_num_bytes_downloaded': 73, '_elapsed': datetime.timedelta(microseconds=189718), '_content': b'{\"result\":\"failed\",\"validations\":{\"rule.interface\":\"option not in list\"}}', '_text': '{\"result\":\"failed\",\"validations\":{\"rule.interface\":\"option not in list\"}}'}"}
# ERROR:
{'rule.interface': 'option not in list'}
Expand Down Expand Up @@ -66,7 +66,7 @@ Known issues

Many of the modules need to 'apply' its configuration after a change happened.

Sometimes this 'reload' takes some time as the firewall needs to process some information.
Sometimes this :code:`reload` takes some time as the firewall needs to process some information.

Per example:

Expand Down
12 changes: 12 additions & 0 deletions docs/source/usage/4_develop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ The basic API interaction is handled in 'ansibleguy.opnsense.plugins.module_util

It is a generic abstraction layer for interacting with the api - therefore all plugins should be able to function with it!

Install
*******

You can install the collection to a specific directory for easier testing.

.. code-block:: bash
cd $PLAYBOOK_DIR
ansible-galaxy collection install git+https://github.com/ansibleguy/collection_opnsense.git,<COMMIT/BRANCH> -p ./collections
Of course you can always place the repository at :code:`${PLAYBOOK_DIR}/ansible_collections/ansibleguy/opnsense` so it gets picked-up by Ansible.

API Definition
**************

Expand Down

0 comments on commit 6ee6a65

Please sign in to comment.