feat(ansible): allow for input variable files to configure forge behavior (#13)

This commit is contained in:
Stephan Lüscher 2024-05-03 14:21:06 +00:00
parent 7ae5826f4a
commit cb4d82c7cf
No known key found for this signature in database
GPG key ID: 445779060FF3D3CF
9 changed files with 60 additions and 14 deletions

View file

@ -2,10 +2,15 @@
- name: Build project
hosts: host.ublue.local
gather_facts: true
pre_tasks:
- name: DEBUG - forge variables
ansible.builtin.include_role:
name: debug_forge_vars
tasks:
- name: Build and push an image to registry
- name: Build and push image to registry
containers.podman.podman_image:
name: bluefin
name: "{{ forge_git_repository_url | regex_search(__regex_search) }}"
tag: latest
path: "{{ forge_git_repository_destination }}"
build:
@ -15,3 +20,10 @@
push: true
push_args:
dest: "{{ forge_registry_url }}"
vars:
__regex_search: (?<=/)[^/]+(?=\.git)
register: __podman_image_info
- name: INFO | Status from build and push
ansible.builtin.debug:
msg: "{{ __podman_image_info }}"