semaphore/tasks/install.yaml
2025-09-30 19:45:08 +02:00

53 lines
1.6 KiB
YAML

---
# create directories
- name: "create semaphore directories"
ansible.builtin.file:
path: "{{ item }}"
state: "directory"
mode: "0755"
loop:
- "/mnt/semaphore"
- "/mnt/semaphore/data"
- "/mnt/semaphore/tmp"
# run semaphore
- name: "run semaphore"
community.docker.docker_container:
container_default_behavior: "no_defaults"
detach: "yes"
pull: "always"
state: "started"
name: "semaphore"
image: "docker.io/semaphoreui/semaphore:v2.16.18"
restart_policy: "unless-stopped"
ports:
- "3000:3000"
volumes:
- "/mnt/semaphore/data:/var/lib/semaphore"
- "/mnt/semaphore/tmp:/tmp/semaphore"
env:
# ansible
ANSIBLE_HOST_KEY_CHECKING: "False"
# semaphore
SEMAPHORE_ADMIN_EMAIL: "{{ semaphore_admin_email }}"
SEMAPHORE_ADMIN_NAME: "{{ semaphore_admin_name }}"
SEMAPHORE_ADMIN_PASSWORD: "{{ semaphore_admin_password }}"
SEMAPHORE_ADMIN: "{{ semaphore_admin_username }}"
SEMAPHORE_EMAIL_SENDER: "{{ semaphore_email_sender }}"
SEMAPHORE_EMAIL_USERNAME: "{{ semaphore_email_username }}"
SEMAPHORE_EMAIL_HOST: "{{ semaphore_email_host }}"
SEMAPHORE_EMAIL_PORT: "{{ semaphore_email_port }}"
SEMAPHORE_EMAIL_PASSWORD: "{{ semaphore_email_password }}"
SEMAPHORE_EMAIL_SECURE: "True"
SEMAPHORE_EMAIL_TLS: "True"
SEMAPHORE_DB_DIALECT: "sqlite"
SEMAPHORE_RUNNER_REGISTRATION_TOKEN: "{{ semaphore_runner_token }}"
SEMAPHORE_TOTP_ALLOW_RECOVERY: "True"
SEMAPHORE_TOTP_ENABLED: "True"
SEMAPHORE_USE_REMOTE_RUNNER: "True"