support volumes that are paths on the host
This commit is contained in:
parent
e688ca9f6c
commit
40a1d88bdf
@ -1,5 +1,4 @@
|
||||
---
|
||||
|
||||
- name: Activar container dovecot
|
||||
docker_container:
|
||||
name: "{{ dovecot_container }}"
|
||||
@ -50,30 +49,63 @@
|
||||
ANTISPAM_ENABLE: "{{ 'yes' if dovecot_antispam_enable else '' }}"
|
||||
register: container
|
||||
|
||||
- name: Leer info de volumen {{ dovecot_volume_config }}
|
||||
docker_volume_info:
|
||||
name: "{{ dovecot_volume_config }}"
|
||||
register: res_cfg
|
||||
|
||||
- name: Leer info de volumen {{ dovecot_volume_mail }}
|
||||
docker_volume_info:
|
||||
name: "{{ dovecot_volume_mail }}"
|
||||
register: res_mail
|
||||
|
||||
- name: Leer info de volumen {{ dovecot_volume_ssl }}
|
||||
docker_volume_info:
|
||||
name: "{{ dovecot_volume_ssl }}"
|
||||
register: res_ssl
|
||||
|
||||
- name: Exportar informacion de volumen
|
||||
- name: Exportar informacion de container
|
||||
set_fact:
|
||||
dovecot_container: "{{ lookup('vars','dovecot_container') }}"
|
||||
dovecot_volume_config: "{{ lookup('vars','dovecot_volume_config') }}"
|
||||
dovecot_mountpoint_config: "{{ res_cfg.volume.Mountpoint }}"
|
||||
dovecot_volume_mail: "{{ lookup('vars','dovecot_volume_mail') }}"
|
||||
dovecot_mountpoint_mail: "{{ res_mail.volume.Mountpoint }}"
|
||||
dovecot_volume_ssl: "{{ lookup('vars','dovecot_volume_ssl') }}"
|
||||
dovecot_mountpoint_ssl: "{{ res_ssl.volume.Mountpoint }}"
|
||||
|
||||
- when: dovecot_volume_config[0] != '/'
|
||||
block:
|
||||
- name: Leer info de volumen {{ dovecot_volume_config }}
|
||||
docker_volume_info:
|
||||
name: "{{ dovecot_volume_config }}"
|
||||
register: res_cfg
|
||||
- name: Exportar informacion de volumen
|
||||
set_fact:
|
||||
dovecot_volume_config: "{{ lookup('vars','dovecot_volume_config') }}"
|
||||
dovecot_mountpoint_config: "{{ res_cfg.volume.Mountpoint }}"
|
||||
|
||||
- when: dovecot_volume_config[0] == '/'
|
||||
block:
|
||||
- name: Exportar informacion de volumen
|
||||
set_fact:
|
||||
dovecot_volume_config: "{{ lookup('vars','dovecot_volume_config') }}"
|
||||
dovecot_mountpoint_config: "{{ lookup('vars','dovecot_volume_config') }}"
|
||||
|
||||
- when: dovecot_volume_mail[0] != '/'
|
||||
block:
|
||||
- name: Leer info de volumen {{ dovecot_volume_mail }}
|
||||
docker_volume_info:
|
||||
name: "{{ dovecot_volume_mail }}"
|
||||
register: res_mail
|
||||
- name: Exportar informacion de volumen
|
||||
set_fact:
|
||||
dovecot_volume_mail: "{{ lookup('vars','dovecot_volume_mail') }}"
|
||||
dovecot_mountpoint_mail: "{{ res_mail.volume.Mountpoint }}"
|
||||
|
||||
- when: dovecot_volume_mail[0] == '/'
|
||||
block:
|
||||
- name: Exportar informacion de volumen
|
||||
set_fact:
|
||||
dovecot_volume_mail: "{{ lookup('vars','dovecot_volume_mail') }}"
|
||||
dovecot_mountpoint_mail: "{{ lookup('vars','dovecot_volume_mail') }}"
|
||||
|
||||
- when: dovecot_volume_ssl[0] != '/'
|
||||
block:
|
||||
- name: Leer info de volumen {{ dovecot_volume_ssl }}
|
||||
docker_volume_info:
|
||||
name: "{{ dovecot_volume_ssl }}"
|
||||
register: res_ssl
|
||||
- name: Exportar informacion de volumen
|
||||
set_fact:
|
||||
dovecot_volume_ssl: "{{ lookup('vars','dovecot_volume_ssl') }}"
|
||||
dovecot_mountpoint_ssl: "{{ res_ssl.volume.Mountpoint }}"
|
||||
|
||||
- when: dovecot_volume_ssl[0] == '/'
|
||||
block:
|
||||
- name: Exportar informacion de volumen
|
||||
set_fact:
|
||||
dovecot_volume_ssl: "{{ lookup('vars','dovecot_volume_ssl') }}"
|
||||
dovecot_mountpoint_ssl: "{{ lookup('vars','dovecot_volume_ssl') }}"
|
||||
|
||||
# FIXME: configurar quota mediante confd
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user