Use a role to build apache-scuttle image.
This commit is contained in:
parent
e25c7d7cae
commit
b7c6f4e752
@ -3,3 +3,6 @@
|
||||
src : ssh://git@git.scimetis.net:2222/yohan/role_setup_volume.git
|
||||
scm: git
|
||||
|
||||
- name : role_build_container_image
|
||||
src : ssh://git@git.scimetis.net:2222/yohan/role_build_container_image.git
|
||||
scm: git
|
||||
|
@ -1,29 +0,0 @@
|
||||
---
|
||||
- name: Get {{ item.repo_name }} repo's last commit
|
||||
ansible.builtin.git:
|
||||
repo: "{{ item.repo_url }}"
|
||||
clone: no
|
||||
update: no
|
||||
version: master
|
||||
register: git
|
||||
changed_when: false
|
||||
|
||||
- name: Set fact commit
|
||||
set_fact:
|
||||
commit: "{{ git.after[0:10] }}"
|
||||
|
||||
- name: Build {{ item.image_name }} image
|
||||
containers.podman.podman_image:
|
||||
name: "{{ item.image_name }}"
|
||||
path: "{{ item.repo_url }}"
|
||||
force: true
|
||||
build:
|
||||
force_rm: true
|
||||
annotation:
|
||||
git_commit: "{{ commit }}"
|
||||
become: true
|
||||
register: result
|
||||
|
||||
- name: Set fact {{ item.result_var }}
|
||||
set_fact:
|
||||
"{{ item.result_var }}": "{{ result }}"
|
@ -78,12 +78,15 @@
|
||||
- scuttle_php5-fpm_conf
|
||||
when: not scuttle_installed_flag.stat.exists
|
||||
|
||||
- name: Include build_image.yml
|
||||
ansible.builtin.include_tasks: "tasks/build_image.yml"
|
||||
- name: Build image
|
||||
ansible.builtin.include_role:
|
||||
name: role_build_container_image
|
||||
vars:
|
||||
image: "{{ item }}"
|
||||
with_items:
|
||||
- repo_url: "https://git.{{ DOMAIN }}/yohan/docker-apache-for-fpm.git"
|
||||
repo_name: docker-apache-for-fpm
|
||||
image_name: apache-scuttle
|
||||
name: apache-scuttle
|
||||
result_var: apache_scuttle_result
|
||||
|
||||
- name: Create apache-scuttle container
|
||||
|
Loading…
Reference in New Issue
Block a user