diff --git a/tasks/rocketchat.yml b/tasks/rocketchat.yml index 71bc491..4cb7eda 100644 --- a/tasks/rocketchat.yml +++ b/tasks/rocketchat.yml @@ -52,17 +52,17 @@ dest: /home/{{ main_user }}/rocketchat/docker remote_src: yes -- name: copy docker compose to server - become_user: "{{ main_user }}" - copy: - src: files/docker-compose.yml - dest: /home/{{ main_user }}/rocketchat/ +- name: copy docker compose to server (from template) + template: + src: templates/docker-compose.yml.j2 + dest: /home/{{ main_user }}/rocketchat/docker-compose.yml - name: bring down rocketchat docker-compose become_user: "{{ main_user }}" docker_compose: project_src: /home/{{ main_user }}/rocketchat/ state: absent + remove_orphans: true register: __remove_rocketchat tags: - bring-down diff --git a/files/docker-compose.yml b/templates/docker-compose.yml.j2 old mode 100755 new mode 100644 similarity index 93% rename from files/docker-compose.yml rename to templates/docker-compose.yml.j2 index 25b9d79..51b00d0 --- a/files/docker-compose.yml +++ b/templates/docker-compose.yml.j2 @@ -2,7 +2,7 @@ version: '3.7' services: rocketchat: - image: rocket.chat:4.0.3 + image: rocket.chat:{{ rc_version }} command: > bash -c "for (( ; ; )); do