Released pihole-FTL checks an app_pwhash that does not start with `$` as a legacy double-SHA256 hash and, on a match, upgrades it to a BALLOON hash written into the main webserver.api.pwhash. One login with the app password the role rendered therefore replaced the web password. FTL master fixes this, no release has it yet, and the role does not pin FTL. validate.yml now refuses a non-empty config.webserver.api.app_password, and the template always renders app_pwhash = "", which FTL treats as app passwords disabled. The key stays in the defaults; only a value is refused. Molecule verifies the rendered empty hash and the new refusal. BREAKING CHANGE: a non-empty config.webserver.api.app_password now fails the role, and app_pwhash always renders empty. Refs: #383 Assisted-by: Claude Code
93 lines
4.7 KiB
YAML
93 lines
4.7 KiB
YAML
---
|
|
argument_specs:
|
|
main:
|
|
short_description: Install and configure Pi-hole from the upstream repository
|
|
description:
|
|
- >-
|
|
Asserts an Ubuntu host and the merged settings, merges the C(pihole_overrides) dictionary over
|
|
C(pihole_default), installs the apt dependencies, creates the C(pihole) system user, renders C(pihole.toml),
|
|
clones the upstream repository, runs its installer in unattended mode on first install, and runs the
|
|
installer's reconfigure mode when C(pihole.toml) changes.
|
|
- >-
|
|
The configuration contract is a single dictionary, C(pihole_overrides), whose keys are merged recursively
|
|
over C(pihole_default) in C(defaults/main.yml). The spec types it as a dictionary only, because sub-options
|
|
would reject every key it does not list. The merged result is an internal fact and never overwrites the
|
|
input. The role fails unless the merged C(config.dns.upstreams) is a non-empty list, C(config.dns.interface)
|
|
is a non-empty string and C(config.webserver.api.password) is a string other than
|
|
C(changetoyourownpassword).
|
|
- >-
|
|
C(pihole_default) (every setting rendered into C(pihole.toml)) and C(pihole_install_script) (the quoted
|
|
installer path under C(repo.path)) are role defaults deliberately not listed here, because argument
|
|
validation templates every listed variable. C(pihole_install_script) reads the merged settings, which the
|
|
role sets only after validation. Templating C(pihole_default) would turn a missing C(pihole_web_password)
|
|
into an undefined-variable error before the clean missing-required-arguments message. Override settings
|
|
through C(pihole_overrides) instead.
|
|
options:
|
|
pihole_web_password:
|
|
type: raw
|
|
required: true
|
|
no_log: true
|
|
description:
|
|
- >-
|
|
The Pi-hole web interface and API password, the default of the merged
|
|
C(config.webserver.api.password). A secret: source it from a vaulted variable. Required even when
|
|
C(pihole_overrides) sets the password, because the merge templates the whole of C(pihole_default),
|
|
which references it.
|
|
- The rendered C(pihole.toml) holds it hashed twice with SHA-256 (C(pwhash)).
|
|
pihole_overrides:
|
|
type: dict
|
|
default: {}
|
|
no_log: true
|
|
description:
|
|
- >-
|
|
Overrides merged recursively over C(pihole_default). Specify only the keys to change. Define the whole
|
|
dictionary in one place, because a dictionary set in two variable sources is not merged and the
|
|
higher-precedence one wins.
|
|
- >-
|
|
C(config.dns.interface) must be set (string, for example C(eth0)): its default is an empty placeholder
|
|
and the role fails until it is set. C(config.dns.upstreams) (list of IP addresses or hostnames,
|
|
optionally with C(#port)) must stay non-empty. C(config.webserver.api.password) must stay a string.
|
|
C(config.webserver.api.totp_secret) is also a credential.
|
|
- >-
|
|
C(config.webserver.api.app_password) must stay empty and C(app_pwhash) always renders empty, which
|
|
disables app passwords: released pihole-FTL replaces the main web password on a login with a
|
|
legacy-hashed app password.
|
|
- >-
|
|
Other keys the tasks read are C(repo.remote), C(repo.version) (a tag, default C(v6.4)), C(repo.path)
|
|
(default C(~/.cache/pi-hole) of the connecting user), C(user), C(group) (both default C(pihole)) and
|
|
C(config.files.database) (its directory receives C(pihole.toml)). Every other key is rendered into
|
|
C(pihole.toml).
|
|
pihole_testing:
|
|
type: bool
|
|
default: false
|
|
description:
|
|
- >-
|
|
When true the role prints the merged settings with the web password, app password and TOTP secret
|
|
masked, pauses C(pihole_testing_timeout) seconds, and on a first install reads and prints the installer
|
|
log.
|
|
pihole_testing_timeout:
|
|
type: int
|
|
default: 5
|
|
description:
|
|
- Seconds to pause after the merge result is printed. Only used when C(pihole_testing) is true.
|
|
pihole_apt_dependencies:
|
|
type: list
|
|
elements: str
|
|
default:
|
|
- curl
|
|
- git
|
|
- procps
|
|
- lighttpd-mod-deflate
|
|
- apt-utils
|
|
- whiptail
|
|
- dnsutils
|
|
- bc
|
|
- unzip
|
|
- wget
|
|
- sudo
|
|
- netcat-openbsd
|
|
- cron
|
|
- iproute2
|
|
description:
|
|
- apt packages installed before the clone. Overriding replaces the whole list.
|