You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.7 KiB

- name: Set up Woodpecker
hosts: lotus-land-story
vars_files:
- vars.yml
tasks:
- name: Make /mnt/lotus-land-story/woodpecker
ansible.builtin.file:
path: /mnt/lotus-land-story/woodpecker
state: directory
mode: "0755"
# owner: 65532
# group: 65532
- name: Run Woodpecker server
community.docker.docker_container:
name: woodpecker-server
image: woodpeckerci/woodpecker-server:v0.15.11
state: absent
restart: true
env:
# WOODPECKER_OPEN: "true"
WOODPECKER_HOST: "{{ woodpecker.host }}"
WOODPECKER_AGENT_SECRET: "{{ woodpecker.secret }}"
WOODPECKER_GITEA: "true"
WOODPECKER_GITEA_URL: "{{ woodpecker.gitea.url }}"
WOODPECKER_GITEA_CLIENT: "{{ woodpecker.gitea.client }}"
WOODPECKER_GITEA_SECRET: "{{ woodpecker.gitea.secret }}"
WOODPECKER_ADMIN: "alpha"
volumes:
- /mnt/lotus-land-story/woodpecker:/var/lib/woodpecker
restart_policy: unless-stopped
networks:
- name: lotus_land_story
- name: Run Woodpecker agent
community.docker.docker_container:
name: woodpecker-agent
image: woodpeckerci/woodpecker-agent:v0.15.11
state: absent
restart: true
env:
WOODPECKER_SERVER: woodpecker-server:9000
WOODPECKER_AGENT_SECRET: "{{ woodpecker.secret }}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart_policy: unless-stopped
networks:
- name: lotus_land_story
handlers:
- name: Import restarts
ansible.builtin.import_tasks: restarts.yml
# vim: ft=yaml.ansible