Allow pushing newly build containers to registry
This commit is contained in:
parent
f7eb4fa46d
commit
ac11f3e4f3
@ -6,3 +6,4 @@ state: present # or running, build, absent
|
|||||||
execute: smart # or always or never
|
execute: smart # or always or never
|
||||||
disable_template: false
|
disable_template: false
|
||||||
docker_profiles: []
|
docker_profiles: []
|
||||||
|
docker_push: false # only works with build currently
|
||||||
|
@ -6,11 +6,16 @@
|
|||||||
community.docker.docker_compose:
|
community.docker.docker_compose:
|
||||||
project_src: "{{ service_dir | mandatory }}"
|
project_src: "{{ service_dir | mandatory }}"
|
||||||
state: present
|
state: present
|
||||||
restarted: true
|
restarted: false
|
||||||
recreate: smart
|
recreate: smart
|
||||||
build: true
|
build: true
|
||||||
remove_orphans: true
|
remove_orphans: true
|
||||||
profiles: docker_profiles
|
profiles: docker_profiles
|
||||||
when: (compose_files.changed and execute == "smart") or execute == "always"
|
when: (compose_files.changed and execute == "smart") or execute == "always"
|
||||||
|
- name: Push compose container images
|
||||||
|
ansible.builtin.shell:
|
||||||
|
chdir: "{{ service_dir | mandatory }}"
|
||||||
|
cmd: "docker-compose push"
|
||||||
|
when: docker_push | bool
|
||||||
|
|
||||||
# vim: ft=yaml.ansible
|
# vim: ft=yaml.ansible
|
||||||
|
Loading…
Reference in New Issue
Block a user