Ansible role for installing and configuring Anchor
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Simon Cornet 1572763fd9
All checks were successful
ci/woodpecker/push/linting Pipeline was successful
docs: update readme image version
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 17:32:53 +02:00
.woodpecker chore(package): update cr.simoncor.net/dockerhub/davidanson/markdownlint-cli2 docker tag to v0.23.3 2026-09-20 05:46:21 +00:00
meta feat: initial commit 2026-05-29 17:51:13 +02:00
roles feat: initial commit 2026-05-29 17:51:13 +02:00
tasks chore(package): update cr.simoncor.net/ghcr/zhfahim/anchor docker tag to v0.17.2 2026-09-28 08:30:11 +00:00
.ansible-lint fix: exclude only sops yml files from lint 2026-07-14 16:23:33 +02:00
.editorconfig feat: initial commit 2026-05-29 17:51:13 +02:00
.gitattributes feat: initial commit 2026-05-29 17:51:13 +02:00
.gitignore feat: initial commit 2026-05-29 17:51:13 +02:00
.markdownlint-cli2.jsonc feat: initial commit 2026-05-29 17:51:13 +02:00
.sops.yaml fix: correct sops regex to ya?ml 2026-07-14 16:01:40 +02:00
.yamllint chore: exclude .yml files from lint configs 2026-07-14 16:17:16 +02:00
ansible.cfg chore: sync linting and config files from common 2026-07-14 11:33:15 +02:00
playbook.yaml chore(playbook): run galaxy install only on first host 2026-08-13 08:49:28 +02:00
readme.md docs: update readme image version 2026-10-05 17:32:53 +02:00
renovate.json feat: initial commit 2026-05-29 17:51:13 +02:00

Ansible Role: Anchor

Install and configure Anchor - a self-hosted note-taking app. The role runs Anchor as a Docker container and prunes unused Docker resources afterwards.

Requirements

A host with Docker (installed by the docker role). The container is exposed on the host via Traefik (installed by the traefik role), which is expected to route notes.simoncor.net to port 3000.

Dependencies

The playbook runs these roles first (see roles/requirements.yml):

  • docker
  • traefik

Variables

The role has no defaults/main.yaml. It only uses one variable that is expected to be defined elsewhere (for example by the common role or in the inventory).

Variable Required Default Description
timezone Yes Timezone (TZ) for the container

The image tag (0.17.2), the public URL (APP_URL) and the paths are hardcoded in tasks/anchor.yaml.

Example

timezone: "Europe/Amsterdam"

Usage

Run the role through Semaphore using playbook.yaml. The playbook first runs ansible-galaxy install -f -r roles/requirements.yml to refresh the role dependencies, then runs the docker, traefik and anchor roles.

Notes

Item Value
Container anchor (restart policy unless-stopped)
Image cr.simoncor.net/ghcr/zhfahim/anchor:0.17.2
Port 3000/tcp on the host
Data directory /mnt/anchor/data (mounted at /data)
Environment APP_URL=https://notes.simoncor.net, internal auth off

DISABLE_INTERNAL_AUTH is set to true, so authentication must be handled in front of the app.

The cleanup tasks run docker_prune and docker system prune --all --force --volumes after every run. This removes all unused images, networks and volumes on the host, including those of other containers.