moved drone to podman

This commit is contained in:
Bastian de Byl
2022-04-30 15:05:46 -04:00
parent cb2001357f
commit 8e373896a6
12 changed files with 37 additions and 47 deletions

View File

@@ -0,0 +1,61 @@
---
- name: create required drone volumes
become: true
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: "{{ podman_user }}"
group: "{{ podman_user }}"
mode: 0755
notify: restorecon podman
with_items:
- "{{ drone_path }}/data"
tags: drone
- meta: flush_handlers
tags: drone
- name: create drone-ci server container
become: true
become_user: "{{ podman_user }}"
containers.podman.podman_container:
name: drone
image: docker.io/drone/drone:latest
recreate: false
restart: true
restart_policy: on-failure
log_driver: journald
env:
DRONE_GITHUB_CLIENT_ID: "{{ drone_gh_client_id }}"
DRONE_GITHUB_CLIENT_SECRET: "{{ drone_gh_client_sec }}"
DRONE_GIT_ALWAYS_AUTH: "true"
DRONE_RPC_SECRET: "{{ drone_rpc_secret }}"
DRONE_SERVER_HOST: "{{ ci_server_name }}"
DRONE_SERVER_PROTO: "{{ drone_server_proto }}"
DRONE_USER_FILTER: "{{ drone_user_filter }}"
volumes:
- "{{ drone_path }}/data:/data"
ports:
- "8080:80"
tags: drone
- name: create drone-ci worker container
become: true
become_user: "{{ podman_user }}"
containers.podman.podman_container:
name: drone-runner
image: docker.io/80x86/drone-runner-podman:latest
recreate: false
restart: true
restart_policy: on-failure
log_driver: journald
env:
DRONE_RPC_SECRET: "{{ drone_rpc_secret }}"
DRONE_RPC_HOST: "{{ ci_server_name }}"
DRONE_RPC_PROTO: "{{ drone_server_proto }}"
DRONE_RUNNER_CAPACITY: "{{ drone_runner_capacity }}"
volumes:
- /run/user/1002/podman/podman.sock:/run/podman/podman.sock
ports:
- "3000:3000"
tags: drone

View File

@@ -16,7 +16,7 @@
- name: copy configuration and automations
become: true
ansible.builtin.copy:
src: "files/{{ item }}"
src: "files/hass/{{ item }}"
dest: "{{ hass_path }}/config/{{ item }}"
owner: "{{ podman_user }}"
group: "{{ podman_user }}"

View File

@@ -1,5 +1,6 @@
---
- import_tasks: podman.yml
- import_tasks: container-awsddns.yml
- import_tasks: container-partkeepr.yml
- import_tasks: container-drone.yml
- import_tasks: container-hass.yml
- import_tasks: container-partkeepr.yml