runner image and setup for gitea workflow with self signed cert
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# - name: step-ca
|
||||
# ansible.builtin.import_playbook: step-ca.yml
|
||||
- name: step-ca
|
||||
ansible.builtin.import_playbook: step-ca.yml
|
||||
|
||||
- name: Fetch Step-CA root certificate
|
||||
hosts: localhost
|
||||
@@ -26,6 +26,39 @@
|
||||
become_user: "{{ step_ca_user }}"
|
||||
run_once: true
|
||||
|
||||
- name: Préparer le répertoire de build
|
||||
file:
|
||||
path: /tmp/gitea-runner-image
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Copier le root CA dans le contexte Docker
|
||||
copy:
|
||||
src: "{{ tmp_dir }}/root_ca.crt"
|
||||
dest: /tmp/gitea-runner-image/root_ca.crt
|
||||
mode: '0644'
|
||||
|
||||
- name: Créer le Dockerfile pour l'image runner avec CA custom
|
||||
copy:
|
||||
dest: /tmp/gitea-runner-image/Dockerfile
|
||||
mode: '0644'
|
||||
content: |
|
||||
FROM gitea/runner-images:ubuntu-latest
|
||||
|
||||
COPY root_ca.crt /usr/local/share/ca-certificates/root_ca.crt
|
||||
RUN update-ca-certificates
|
||||
|
||||
- name: Builder l'image runner avec le CA
|
||||
community.docker.docker_image:
|
||||
name: gitea.arcodange.lab/arcodange-org/runner-images
|
||||
tag: ubuntu-latest-ca
|
||||
source: build
|
||||
build:
|
||||
path: /tmp/gitea-runner-image
|
||||
push: true
|
||||
|
||||
# - /etc/ssl/certs:/etc/ssl/certs:ro
|
||||
|
||||
# - name: Distribute Step-CA root certificate
|
||||
# hosts: all
|
||||
# gather_facts: true
|
||||
|
||||
Reference in New Issue
Block a user