-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3955c62
commit a5b61dd
Showing
5 changed files
with
172 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Contribute | ||
|
||
Thank you for considering to contribute to this project! | ||
|
||
## What to contribute | ||
|
||
* report errors as [issues](https://github.com/ansibleguy/collection_opnsense/issues) | ||
* test unstable modules and [report if they work as expected](https://github.com/ansibleguy/collection_opnsense/discussions/new?category=general) | ||
* add [ansible-based tests](https://github.com/ansibleguy/collection_opnsense/blob/latest/tests) for some error-case(s) you have encountered | ||
* extend or correct the [documentation](https://github.com/ansibleguy/collection_opnsense/blob/latest/docs) | ||
* add missing inline documentation [as standardized](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_documenting.html#documentation-block) | ||
* should be placed in `<COLLECTION>/plugins/module_utils/inline_docs/<MODULE>.py` and then imported in the module | ||
* contribute code fixes or optimizations | ||
* implement additional API endpoints/modules | ||
|
||
## Module development | ||
|
||
See: [Documentation - Development](https://opnsense.ansibleguy.net/en/latest/usage/4_develop.html) |
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 @@ | ||
.. _modules_<module>: | ||
|
||
.. include:: ../_include/head.rst | ||
|
||
============ | ||
MODULE TITLE | ||
============ | ||
|
||
**STATE**: unstable | ||
|
||
**TESTS**: `Playbook <https://github.com/ansibleguy/collection_opnsense/blob/latest/tests/<module>.yml>`_ | ||
|
||
**API Docs**: `<module> <https://docs.opnsense.org/development/api/core/<module>.html>`_ | ||
|
||
**Service Docs**: `<module> <https://docs.opnsense.org/manual/<module>.html>`_ | ||
|
||
|
||
Definition | ||
********** | ||
|
||
.. csv-table:: Definition | ||
:header: "Parameter", "Type", "Required", "Default", "Aliases", "Comment" | ||
:widths: 15 10 10 10 10 45 | ||
|
||
"parameter name","parameter type","if is required","default value","aliases","description" | ||
"placeholder","string","false","\-","\-","Some description" | ||
"reload","boolean","false","true","\-", .. include:: ../_include/param_reload.rst | ||
|
||
.. include:: ../_include/param_basic.rst | ||
|
||
Usage | ||
***** | ||
|
||
Basic description of the module. | ||
|
||
Place for additional information the user should know of. | ||
|
||
Examples | ||
******** | ||
|
||
.. code-block:: yaml | ||
- hosts: localhost | ||
gather_facts: false | ||
module_defaults: | ||
group/ansibleguy.opnsense.all: | ||
firewall: 'opnsense.template.ansibleguy.net' | ||
api_credential_file: '/home/guy/.secret/opn.key' | ||
ansibleguy.opnsense.list: | ||
target: '<module>' | ||
tasks: | ||
# add optional parameters commented-out | ||
# required ones normally | ||
# add their default values to get a brief overview of how the module works | ||
- name: Example | ||
ansibleguy.opnsense.<module>: | ||
description: 'test1' | ||
command: 'system remote backup' | ||
# state: 'absent' | ||
# debug: false | ||
- name: Adding something | ||
ansibleguy.opnsense.<module>: | ||
- name: Changing something | ||
ansibleguy.opnsense.<module>: | ||
- name: Listing jobs | ||
ansibleguy.opnsense.list: | ||
# target: '<module>' | ||
register: existing_jobs | ||
- name: Printing | ||
ansible.builtin.debug: | ||
var: existing_jobs.data |
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,13 @@ | ||
# docs as described here: https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_documenting.html#module-format-and-documentation | ||
|
||
DOCUMENTATION = r'''' | ||
''' | ||
|
||
EXAMPLES = r''' | ||
''' | ||
|
||
RETURN = r''' | ||
''' |