75 lines
1.7 KiB
YAML
75 lines
1.7 KiB
YAML
---
|
|
- name: install prerquisite
|
|
yum:
|
|
name:
|
|
- php-xml
|
|
- php-mbstring
|
|
- php-pdo
|
|
- php-intl
|
|
- php-ldap
|
|
- php-mysqlnd
|
|
state: installed
|
|
|
|
- name: unarchive roundcube
|
|
unarchive:
|
|
#src: webmail/roundcubemail-1.5.6-complete.tar.gz
|
|
src: webmail/roundcubemail-1.5.9-complete.tar
|
|
dest: /usr/share/
|
|
#remote_src: True
|
|
owner: apache
|
|
group: apache
|
|
|
|
- name: create link webmail
|
|
file:
|
|
#src: /usr/share/roundcubemail-1.5.6
|
|
src: /usr/share/roundcubemail-1.5.9
|
|
dest: /usr/share/webmail
|
|
state: link
|
|
owner: apache
|
|
group: apache
|
|
|
|
- name: create DB
|
|
mysql_db:
|
|
name: roundcubemail
|
|
state: present
|
|
become: true
|
|
|
|
- name: create DB user
|
|
mysql_user:
|
|
name: roundcube
|
|
password: Erfg67Jnmk
|
|
priv: 'roundcubemail.*:ALL'
|
|
state: present
|
|
column_case_sensitive: false
|
|
become: true
|
|
|
|
- name: copy config roundcube
|
|
template:
|
|
src: webmail/config.inc.php.j2
|
|
dest: /usr/share/webmail/config/config.inc.php
|
|
owner: apache
|
|
group: apache
|
|
become: true
|
|
|
|
- name: create schema DB
|
|
shell: mysql -u roundcube --password=Erfg67Jnmk -e "use roundcubemail;source /usr/share/webmail/SQL/mysql.initial.sql;"
|
|
become: true
|
|
|
|
# - name: Copy logo
|
|
# copy:
|
|
# src: webmail/gmetech-logo-grey-30.png
|
|
# dest: /usr/share/webmail/skins/larry/images/gmetech-logo-grey-30.png
|
|
# owner: apache
|
|
# group: apache
|
|
|
|
- name: copy config apache
|
|
copy:
|
|
src: "webmail/{{ item }}"
|
|
dest: "/etc/httpd/conf.d/{{ item }}"
|
|
with_items:
|
|
- http-webmail.conf
|
|
- https-webmail.conf
|
|
become: true
|
|
notify: restart_httpd
|
|
|