Add simple ci deployment
This commit is contained in:
parent
3ee003f94c
commit
06bb34891e
6 changed files with 162 additions and 0 deletions
|
|
@ -1,4 +1,26 @@
|
|||
---
|
||||
## Prepare woodpecker ci
|
||||
- name: "Select tasks for {{ ansible_distribution }} {{ ansible_distribution_major_version }}"
|
||||
include_tasks: "{{ distribution }}"
|
||||
with_first_found:
|
||||
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
|
||||
- "{{ ansible_distribution }}.yml"
|
||||
- "{{ ansible_os_family }}.yml"
|
||||
loop_control:
|
||||
loop_var: distribution
|
||||
when: gitea_use_ci == True
|
||||
|
||||
- name: Generate agent key
|
||||
ansible.builtin.shell: openssl rand -hex 32
|
||||
register: gitea_woodpecker_agent_secret
|
||||
when: gitea_use_ci == True
|
||||
|
||||
- name: Set agent key
|
||||
ansible.builtin.set_fact:
|
||||
gitea_woodpecker_agent_secret: "{{ gitea_woodpecker_agent_secret.stdout }}"
|
||||
when: gitea_woodpecker_agent_secret.stdout is not undefined and not None
|
||||
|
||||
## Prepare gitea
|
||||
- name: Ensure git user exists with ssh key
|
||||
ansible.builtin.user:
|
||||
name: "{{ gitea_git_username }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue