| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
ci/woodpecker/push/linting Pipeline was successful
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
| .woodpecker | ||
| meta | ||
| roles | ||
| tasks | ||
| .ansible-lint | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .markdownlint-cli2.jsonc | ||
| .sops.yaml | ||
| .yamllint | ||
| ansible.cfg | ||
| playbook.yaml | ||
| readme.md | ||
| renovate.json | ||
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):
dockertraefik
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.