adguardhome_docker

Ansible role adguardhome_docker

Installs and configures adguardhome container based on official adguardhome docker container

GitHub Downloads Version
github downloads Version

Example Playbook

This example is taken from molecule/default/converge.yml and is tested on each push, pull request and release.

---
- name: Converge
  hosts: all
  become: true
  gather_facts: true
  vars:
    adguardhome_docker_config:
      tls:
        options:
          modern:
            minVersion: "VersionTLS13"
            sniStrict: true

  roles:
    - role: "mullholland.adguardhome_docker"

The machine needs to be prepared. In CI this is done using molecule/default/prepare.yml:

---
- name: Prepare
  hosts: all
  become: true
  gather_facts: true
  vars:
    pip_packages:
      - "docker"

  roles:
    - role: mullholland.docker
    - role: mullholland.repository_epel
    - role: mullholland.pip

Role Variables

The default values for the variables are set in defaults/main.yml:

---
# General config
adguardhome_docker_network_name: "web"
adguardhome_docker_base_path: "/opt"
adguardhome_docker_timezone: "Europe/Berlin"

# User/Group of the stack. Everything is mapped to this, instead of root.
adguardhome_docker_user: "homelab"
adguardhome_docker_uid: "900"
adguardhome_docker_group: "homelab"
adguardhome_docker_gid: "900"
adguardhome_docker_user_system: true

# which container version to install
# https://hub.docker.com/_/adguardhome/tags
# can also be latest
adguardhome_docker_version: "adguard/adguardhome:latest"

# additional docker compose environment varaibles
# https://github.com/felddy/foundryvtt-docker?tab=readme-ov-file#optional-variables
adguardhome_docker_environment_variables: []
adguardhome_docker_volumes:
  - "/opt/adguardhome/conf:/opt/adguardhome/conf"
  - "/opt/adguardhome/work:/opt/adguardhome/work"

# which port to expose. can be empty
adguardhome_docker_ports:
  - "53:53/tcp" # (unencrypted) DNS
  - "53:53/udp" # (unencrypted) DNS
  - "67:67/udp" # DHCP
  - "68:68/udp" # DHCP
  - "80:80/tcp" # Admin-WebUI & DNS over HTTPS
  - "443:443/tcp" # Admin-WebUI & DNS over HTTPS
  - "443:443/udp" # Admin-WebUI & DNS over HTTPS
  - "3000:3000/tcp" # First
  - "853:853/tcp" # DNS over TLS
  - "853:853/udp" # DNS over Quic
  - "784:784/udp" # DNS over Quic
  - "8853:8853/udp" # DNS over Quic
  - "5443:5443/tcp" # DNSCrypt
  - "5443:5443/udp" # DNSCrypt

adguardhome_docker_labels:
  - "traefik.enable=false"
# - "traefik.enable=true"
# - "traefik.http.routers.adguardhome.entryPoints=https"
# - "traefik.http.routers.adguardhome.rule=Host(`adguardhome.example.com`)"
# - "traefik.http.routers.adguardhome.tls.certResolver=letsEncrypt"
# - "traefik.http.routers.adguardhome.tls=true"
#  - "traefik.http.routers.adguardhome.service=adguardhome"
#  - "traefik.http.routers.adguardhome.loadbalancer.server.port=80"

Requirements

State of used roles

The following roles are used to prepare a system. You can prepare your system in another way.

Requirement GitHub GitLab
mullholland.repository_epel Build Status GitHub Build Status GitLab
mullholland.docker Build Status GitHub Build Status GitLab
mullholland.pip Build Status GitHub Build Status GitLab

Context

This role is a part of many compatible roles. Have a look at the documentation of these roles for further information.

Here is an overview of related roles: dependencies

Compatibility

This role has been tested on these container images:

container tags
EL all
Fedora 38, 39
Ubuntu all
Debian all

The minimum version of Ansible required is 2.10, tests have been done to:

  • The previous version.
  • The current version.
  • The development version.

If you find issues, please register them in GitHub.

License

MIT.

Author Information

mullholland

About

Installs and configures adguardhome container based on official adguardhome docker container

Install
ansible-galaxy install mullholland/ansible-role-adguardhome_docker
GitHub repository
License
apache-2.0
Downloads
29