remove systemd and use native docker-compose #1

Merged
xoxys merged 4 commits from refactoring into master 2020-06-23 10:55:27 +00:00
Showing only changes of commit 9dd0329855 - Show all commits

View File

@ -1,28 +1,28 @@
--- ---
- block: - block:
- name: Ensure service directory exists - name: Ensure service directory exists
file: file:
path: "{{ bitwardenrs_service_directory }}" path: "{{ bitwardenrs_service_directory }}"
state: directory state: directory
mode: 0755 mode: 0755
- name: Deploy compose file to '{{ bitwardenrs_service_directory }}' - name: Deploy compose file to '{{ bitwardenrs_service_directory }}'
template: template:
src: "services/bitwardenrs-compose.yml.j2" src: "services/bitwardenrs-compose.yml.j2"
dest: "{{ bitwardenrs_service_directory }}/docker-compose.yml" dest: "{{ bitwardenrs_service_directory }}/docker-compose.yml"
owner: root owner: root
group: root group: root
mode: 0640 mode: 0640
validate: "docker-compose -f %s config -q" validate: "docker-compose -f %s config -q"
- name: Ensure service is up and running - name: Ensure service is up and running
docker_compose: docker_compose:
project_src: "{{ bitwardenrs_service_directory }}" project_src: "{{ bitwardenrs_service_directory }}"
pull: yes pull: yes
remove_orphans: yes remove_orphans: yes
stopped: "{{ bitwardenrs_service_stopped }}" stopped: "{{ bitwardenrs_service_stopped }}"
state: present state: present
# temp. disable changes; breaks idempotency for whatever reason # temp. disable changes; breaks idempotency for whatever reason
changed_when: False changed_when: False
become: True become: True
become_user: root become_user: root