2020-06-21 20:00:53 +00:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Ensure service directory exists
|
|
|
|
file:
|
2021-05-15 20:09:29 +00:00
|
|
|
path: "{{ vaultwarden_ldap_service_directory }}"
|
2020-06-21 20:00:53 +00:00
|
|
|
state: directory
|
|
|
|
mode: 0755
|
|
|
|
|
2021-05-15 20:09:29 +00:00
|
|
|
- name: Deploy compose file to '{{ vaultwarden_ldap_service_directory }}'
|
2020-06-21 20:00:53 +00:00
|
|
|
template:
|
2021-05-15 20:09:29 +00:00
|
|
|
src: "services/vaultwarden_ldap_compose.yml.j2"
|
|
|
|
dest: "{{ vaultwarden_ldap_service_directory }}/docker-compose.yml"
|
2020-06-21 20:00:53 +00:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0640
|
|
|
|
validate: "docker-compose -f %s config -q"
|
|
|
|
|
|
|
|
- name: Ensure service is up and running
|
|
|
|
docker_compose:
|
2021-05-15 20:09:29 +00:00
|
|
|
project_src: "{{ vaultwarden_ldap_service_directory }}"
|
2020-06-21 20:00:53 +00:00
|
|
|
pull: yes
|
|
|
|
remove_orphans: yes
|
2021-05-15 20:09:29 +00:00
|
|
|
stopped: "{{ vaultwarden_ldap_service_stopped }}"
|
2020-06-21 20:00:53 +00:00
|
|
|
state: present
|
|
|
|
become: True
|
|
|
|
become_user: root
|