xoxys.vaultwarden_ldap_docker/tasks/setup.yml

27 lines
801 B
YAML
Raw Normal View History

2020-06-21 20:00:53 +00:00
---
- block:
- name: Ensure service directory exists
file:
path: "{{ vaultwarden_ldap_service_directory }}"
2020-06-21 20:00:53 +00:00
state: directory
mode: 0755
- name: Deploy compose file to '{{ vaultwarden_ldap_service_directory }}'
2020-06-21 20:00:53 +00:00
template:
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:
project_src: "{{ vaultwarden_ldap_service_directory }}"
2020-06-21 20:00:53 +00:00
pull: yes
remove_orphans: yes
stopped: "{{ vaultwarden_ldap_service_stopped }}"
2020-06-21 20:00:53 +00:00
state: present
become: True
become_user: root