Skip to content

Commit

Permalink
Only restart the container if not new
Browse files Browse the repository at this point in the history
  • Loading branch information
phavekes committed Sep 19, 2024
1 parent 9c268dc commit c09c140
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions roles/myconext/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
name: myconextserver
state: started
restart: true
when: container is success and container is not change
5 changes: 3 additions & 2 deletions roles/myconext/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
owner: root
group: root
mode: "0644"

- name: Create directory to keep configfiles
ansible.builtin.file:
dest: "/opt/openconext/myconext"
Expand Down Expand Up @@ -124,6 +124,8 @@
timeout: 10s
retries: 3
start_period: 10s
register: container


- name: Create the client container
community.docker.docker_container:
Expand Down Expand Up @@ -191,4 +193,3 @@
env:
HTTPD_CSP: "{{ httpd_csp.lenient_with_static_img_for_idp }}"
HTTPD_SERVERNAME: "login.{{ myconext_base_domain }}"

0 comments on commit c09c140

Please sign in to comment.