unbound(role): make unbound thread number configurable
Some checks failed
/ Ansible Lint (pull_request) Failing after 2m34s
/ Ansible Lint (push) Failing after 2m36s
/ build (pull_request) Failing after 2m40s

This commit is contained in:
bitwhisker 2026-05-26 10:30:35 +02:00
commit c051fc6337
Signed by: bitwhisker
SSH key fingerprint: SHA256:KybIk/tusSKao6eLGY+ILlFa1rCrzwx66/acBAcKUqE
2 changed files with 3 additions and 2 deletions

View file

@ -17,3 +17,4 @@ The following variables can be used to customize this role:
| unbound_enable_dnssec | Boolean | `true` | Whether dnssec validation should be enabled | | unbound_enable_dnssec | Boolean | `true` | Whether dnssec validation should be enabled |
| unbound_access_control | List of Strings | `[]` | **Required** List of [unbound access control values](https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html#:~:text=access-control:%20%3CIP%20netblock%3E%20%3Caction%3E) | | unbound_access_control | List of Strings | `[]` | **Required** List of [unbound access control values](https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html#:~:text=access-control:%20%3CIP%20netblock%3E%20%3Caction%3E) |
| unbound_disable_systemd_networkd | Boolean | `true` | If true, systemd-networkd is disabled and the local system is pointed towards the configured dns resolver. | | unbound_disable_systemd_networkd | Boolean | `true` | If true, systemd-networkd is disabled and the local system is pointed towards the configured dns resolver. |
| unbound_thread_count | Integer | Max vCPU Count | The number of threads unbound uses |

View file

@ -7,8 +7,8 @@ server:
auto-trust-anchor-file: "/etc/unbound/trusted-key.key" auto-trust-anchor-file: "/etc/unbound/trusted-key.key"
{% endif -%} {% endif -%}
# use all CPUs # num of threads
num-threads: {{ ansible_facts['processor_vcpus'] }} num-threads: {{ unbound_thread_count | default(ansible_facts['processor_vcpus']) }}
# more cache memory # more cache memory
rrset-cache-size: 60m rrset-cache-size: 60m