packmail: use role dependencies instead of include_role
This commit is contained in:
parent
0640a9f8fd
commit
a6499b6712
7
packmail/meta/main.yml
Normal file
7
packmail/meta/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- { role: ldap, ldap_schema: 'cn4evolix.ldif' }
|
||||||
|
- { role: postfix }
|
||||||
|
- { role: dovecot }
|
||||||
|
- { role: apache }
|
||||||
|
- { role: php, php_apache_enable: True }
|
|
@ -1,21 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
- name: Additional packages are installed
|
|
||||||
apt:
|
|
||||||
name: '{{ item }}'
|
|
||||||
state: present
|
|
||||||
with_items:
|
|
||||||
- libapache2-mod-security2
|
|
||||||
- modsecurity-crs
|
|
||||||
- apg
|
|
||||||
|
|
||||||
- name: Additional modules are enabled
|
|
||||||
apache2_module:
|
|
||||||
name: '{{ item }}'
|
|
||||||
state: present
|
|
||||||
with_items:
|
|
||||||
- ssl
|
|
||||||
- include
|
|
||||||
- negotiation
|
|
||||||
- alias
|
|
||||||
|
|
|
@ -1,42 +1,27 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- fail:
|
- fail:
|
||||||
msg: only compatible with Debian >= 9
|
msg: only compatible with Debian >= 9
|
||||||
when:
|
when:
|
||||||
- ansible_distribution != "Debian" or ansible_distribution_major_version | version_compare('9', '<')
|
- ansible_distribution != "Debian" or ansible_distribution_major_version | version_compare('9', '<')
|
||||||
|
|
||||||
- name: Include ldap role
|
- name: Additional packages are installed
|
||||||
include_role:
|
apt:
|
||||||
name: ldap
|
name: '{{ item }}'
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- libapache2-mod-security2
|
||||||
|
- modsecurity-crs
|
||||||
|
- apg
|
||||||
|
|
||||||
- name: upload evolix schema
|
- name: Additional modules are enabled
|
||||||
copy:
|
apache2_module:
|
||||||
src: cn4evolix.ldif
|
name: '{{ item }}'
|
||||||
dest: /root/cn4evolix.ldif
|
state: present
|
||||||
mode: "0640"
|
with_items:
|
||||||
|
- ssl
|
||||||
- name: inject evolix schema
|
- include
|
||||||
command: ldapadd -Y EXTERNAL -H ldapi:/// -f /root/cn4evolix.ldif
|
- negotiation
|
||||||
|
- alias
|
||||||
- name: Include postfix role
|
|
||||||
include_role:
|
|
||||||
name: postfix
|
|
||||||
|
|
||||||
- name: Include dovecot role
|
|
||||||
include_role:
|
|
||||||
name: dovecot
|
|
||||||
|
|
||||||
- name: Include apache role
|
|
||||||
include_role:
|
|
||||||
name: apache
|
|
||||||
|
|
||||||
- name: Include PHP role
|
|
||||||
include_role:
|
|
||||||
name: php
|
|
||||||
vars:
|
|
||||||
php_apache_enable: True
|
|
||||||
|
|
||||||
- include: apache.yml
|
|
||||||
|
|
||||||
- name: Install Evoadmin
|
- name: Install Evoadmin
|
||||||
include_role:
|
include_role:
|
||||||
|
|
Loading…
Reference in a new issue