fabrica/packer/provisioning/playbooks/dolibarr.yml

52 lines
1.3 KiB
YAML
Raw Normal View History

---
- name: Installation Dolibarr Server
hosts: all
environment:
http_proxy: "{{ lookup('env','http_proxy') }}"
https_proxy: "{{ lookup('env','https_proxy') }}"
HTTPS_PROXY: "{{ lookup('env','HTTPS_PROXY') }}"
HTTP_PROXY: "{{ lookup('env','HTTP_PROXY') }}"
tasks:
- name: Update package cache
apt:
update_cache: yes
- name: Install mariadb
apt:
name:
- mariadb-server
- python-mysqldb
- apache2
- php
- php-mysql
- openssl
- php-ldap
- php-mcrypt
- php-intl
- php-zip
state: present
- name: Create a new database with name 'dolibarr'
mysql_db:
name: dolibarr
state: present
- name: Create mysql user
mysql_user:
name: dolibarr
password: '36f3igH9f5TPooZIBY99oA=='
priv: 'dolibarr.*:ALL,GRANT'
state: present
- name: Download Dolibarr
get_url:
url: https://sourceforge.net/projects/dolibarr/files/Dolibarr%20installer%20for%20Debian-Ubuntu%20%28DoliDeb%29/10.0.1/dolibarr_10.0.1-4_all.deb
dest: /tmp/dolibarr_10.0.1.deb
checksum: sha1:74a9bb2ac282715f80ad454cb04ad51ef60de264
- name: Install dolibarr
apt:
deb: /tmp/dolibarr_10.0.1.deb