Repository: ansible-collections/community.general

Issue:
hetzner_firewall example in documentation is wrong
<!--- Verify first that your improvement is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->

##### SUMMARY
<!--- Explain the problem briefly below, add suggestions to wording or structure -->
The parameter **state** is controlling whether the firewall is `present` or `absent` Yet the example code uses:

```yaml
status: active
```

A very easy mistake to make as **status** `active` or `disabled` is part of the return values. No idea why they are not the same but for now it's not working with the example.

<!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? -->

P.S. the Edit on GitHub link is missing here: https://docs.ansible.com/ansible/latest/collections/community/general/hetzner_firewall_module.html and it seems to be broken elsewhere in the docs site anyway.

##### ISSUE TYPE
- Documentation Report

##### COMPONENT NAME
<!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure -->
hetzner_firewall

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.10.1
  config file = None
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
```



Discussion:
Files identified in the description:
None

If these files are inaccurate, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
Files identified in the description:
* [`plugins/modules/net_tools/hetzner_firewall.py`](https://github.com/ansible-collections/community.general/blob/master/plugins/modules/net_tools/hetzner_firewall.py)

If these files are inaccurate, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @felixfontein @nerzhul
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->
@silviuvulcan thanks for spotting and reporting this! I've created #1150 to fix this.

The reason why they are different is that the `state` option uses Ansible's `present`/`absent` for enabling/disabling the firewall (and it feels very wrong to chose something different here), and the return value `firewall` is precisely what Hetzner's API returns, and they use `status` with values `active`/`disabled`.
The not existing/working Edit on GitHub link is a known problem and tracked in ansible/ansible#70267. (It has been removed from the 2.10 docs because it's currently broken.)
> The reason why they are different is that the `state` option uses Ansible's `present`/`absent` for enabling/disabling the firewall (and it feels very wrong to chose something different here), and the return value `firewall` is precisely what Hetzner's API returns, and they use `status` with values `active`/`disabled`.

Thank you @felixfontein for the explanation. It makes sense. 


Resolving patch:
diff --git a/plugins/modules/net_tools/hetzner_firewall.py b/plugins/modules/net_tools/hetzner_firewall.py
--- a/plugins/modules/net_tools/hetzner_firewall.py
+++ b/plugins/modules/net_tools/hetzner_firewall.py
@@ -146,7 +146,7 @@
     hetzner_user: foo
     hetzner_password: bar
     server_ip: 1.2.3.4
-    status: active
+    state: present
     whitelist_hos: yes
     rules:
       input:


Test patch: