mirror of
https://github.com/famedly/ansible-collection-matrix
synced 2024-11-10 13:44:16 +00:00
refactor(barad-dur): migrate to harmonised container image variables
This commit is contained in:
parent
9dbd99a305
commit
fdcb1c23ff
2 changed files with 25 additions and 4 deletions
|
@ -3,11 +3,32 @@ barad_dur_user: barad-dur
|
|||
barad_dur_base_path: /opt/barad-dur
|
||||
barad_dur_container_base_path: "{{ barad_dur_base_path }}"
|
||||
barad_dur_config_file: "{{ barad_dur_base_path }}/config.yaml"
|
||||
barad_dur_version: "0.1.0"
|
||||
|
||||
barad_dur_container_image_registry: "registry.gitlab.com"
|
||||
barad_dur_container_image_namespace: "famedly/company/backend/services/"
|
||||
barad_dur_container_image_name: "barad-dur"
|
||||
barad_dur_version: "0.1.2"
|
||||
#barad_dur_container_image_tag: ~
|
||||
barad_dur_container_force_pull: "{{ barad_dur_container_image_tag is defined }}"
|
||||
|
||||
barad_dur_container_image_reference: >-
|
||||
{{
|
||||
barad_dur_container_image_repository
|
||||
+ ':'
|
||||
+ barad_dur_container_image_tag | default('v' + barad_dur_version)
|
||||
}}
|
||||
barad_dur_container_image_repository: >-
|
||||
{{
|
||||
(
|
||||
container_registries[barad_dur_container_image_registry]
|
||||
| default(barad_dur_container_image_registry)
|
||||
)
|
||||
+ '/'
|
||||
+ barad_dur_container_image_namespace | default('')
|
||||
+ barad_dur_container_image_name
|
||||
}}
|
||||
|
||||
barad_dur_container_name: "barad-dur"
|
||||
barad_dur_container_image_name: "registry.gitlab.com/famedly/infra/services/barad-dur"
|
||||
barad_dur_container_image: "{{ barad_dur_container_image_name }}:{{ barad_dur_container_image_tag|default(['v', barad_dur_version]|join()) }}"
|
||||
barad_dur_container_env: {}
|
||||
barad_dur_container_ports: []
|
||||
barad_dur_container_labels: {}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
- name: Start barad-dur container
|
||||
docker_container:
|
||||
name: "{{ barad_dur_container_name }}"
|
||||
image: "{{ barad_dur_container_image }}"
|
||||
image: "{{ barad_dur_container_image_reference }}"
|
||||
env: "{{ barad_dur_container_env }}"
|
||||
user: "{{ barad_dur_user_res.uid }}:{{ barad_dur_user_res.group }}"
|
||||
ports: "{{ barad_dur_container_ports }}"
|
||||
|
|
Loading…
Reference in a new issue