Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions roles/dev_deploy/tasks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@
set_fact:
albs_jwt: "{{ generated_albs_jwt.token }}"
when: generated_albs_jwt is defined
when: not albs_jwt_token
when: albs_jwt_token | length == 0

- name: Set albs_jwt when is set via vars.yml
tags:
- jwt_tokens
- albs_jwt_token
set_fact:
albs_jwt: "{{ albs_jwt_token }}"
when: albs_jwt_token
when: albs_jwt_token | length > 0

- name: Set alts_jwt when is not set via vars.yml
tags:
Expand All @@ -100,15 +100,15 @@
set_fact:
alts_jwt: "{{ generated_alts_jwt.token }}"
when: generated_alts_jwt is defined
when: not alts_jwt_token
when: alts_jwt_token | length == 0

- name: Set alts_jwt when is set via vars.yml
tags:
- jwt_tokens
- alts_jwt_token
set_fact:
alts_jwt: "{{ alts_jwt_token }}"
when: alts_jwt_token
when: alts_jwt_token | length > 0

- name: Clone ALBS sources
tags: clone-albs-sources
Expand Down
14 changes: 13 additions & 1 deletion roles/dev_deploy/tasks/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@
state: started
when: is_clean_installation.stat.exists == False

- name: Wait for web_server container to be running
community.docker.docker_container_info:
name: "{{ container_name_prefix }}_web_server_1"
register: web_server_info
until: >
web_server_info.container is not none
and (web_server_info.container.State.Running | bool)
and not (web_server_info.container.State.Restarting | bool)
retries: 30
delay: 10
when: is_clean_installation.stat.exists == False

- name: Bootstrap permissions
community.docker.docker_container_exec:
container: "{{ container_name_prefix }}_web_server_1"
Expand Down Expand Up @@ -129,7 +141,7 @@
args:
chdir: "{{ sources_root }}/albs-web-server"
loop: "{{ pre_bootstrap_excluded_containers | default([]) }}"
when: pre_bootstrap_excluded_containers | default([])
when: pre_bootstrap_excluded_containers | default([]) | length > 0

- name: Checking if GPG key exists on web_server
tags: add_pgp_to_web_server
Expand Down
6 changes: 3 additions & 3 deletions roles/dev_deploy/tasks/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
loop: "{{ services.stdout_lines }}"
when:
- docker_compose != "not found"
- excluded_containers or (pre_bootstrap_excluded_containers | default([]))
- (excluded_containers | length > 0) or (pre_bootstrap_excluded_containers | default([]) | length > 0)

- name: Create and start services
shell: "{{ docker_compose }} -p {{ container_name_prefix }} --compatibility up -d --build --force-recreate"
Expand All @@ -35,8 +35,8 @@
register: output
when:
- docker_compose != "not found"
- not excluded_containers
- not (pre_bootstrap_excluded_containers | default([]))
- excluded_containers | length == 0
- pre_bootstrap_excluded_containers | default([]) | length == 0

- debug:
var: output
Expand Down
Loading