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:
|
||||
msg: only compatible with Debian >= 9
|
||||
when:
|
||||
- ansible_distribution != "Debian" or ansible_distribution_major_version | version_compare('9', '<')
|
||||
|
||||
- name: Include ldap role
|
||||
include_role:
|
||||
name: ldap
|
||||
- name: Additional packages are installed
|
||||
apt:
|
||||
name: '{{ item }}'
|
||||
state: present
|
||||
with_items:
|
||||
- libapache2-mod-security2
|
||||
- modsecurity-crs
|
||||
- apg
|
||||
|
||||
- name: upload evolix schema
|
||||
copy:
|
||||
src: cn4evolix.ldif
|
||||
dest: /root/cn4evolix.ldif
|
||||
mode: "0640"
|
||||
|
||||
- name: inject evolix schema
|
||||
command: ldapadd -Y EXTERNAL -H ldapi:/// -f /root/cn4evolix.ldif
|
||||
|
||||
- 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: Additional modules are enabled
|
||||
apache2_module:
|
||||
name: '{{ item }}'
|
||||
state: present
|
||||
with_items:
|
||||
- ssl
|
||||
- include
|
||||
- negotiation
|
||||
- alias
|
||||
|
||||
- name: Install Evoadmin
|
||||
include_role:
|
||||
|
|
Loading…
Reference in a new issue