69 lines
1.6 KiB
YAML
69 lines
1.6 KiB
YAML
|
---
|
||
|
- name: Installation Jorani
|
||
|
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
|
||
|
- unzip
|
||
|
- apache2
|
||
|
- php
|
||
|
- openssl
|
||
|
- php-ldap
|
||
|
- libapache2-mod-php
|
||
|
- php-pear
|
||
|
- php-cgi
|
||
|
- php-cli
|
||
|
- php-common
|
||
|
- php-fpm
|
||
|
- php-gd
|
||
|
- php-json
|
||
|
- php-mysql
|
||
|
- php-readline
|
||
|
- php-curl
|
||
|
- php-intl
|
||
|
- php-mcrypt
|
||
|
- php-xml
|
||
|
- php-mbstring
|
||
|
|
||
|
state: present
|
||
|
|
||
|
- name: Create a new database with name 'jorani'
|
||
|
mysql_db:
|
||
|
name: jorani
|
||
|
state: present
|
||
|
|
||
|
- name: Create mysql user
|
||
|
mysql_user:
|
||
|
name: jorani
|
||
|
password: 'FWUiVANngFqcIvcY8C7XWA=='
|
||
|
priv: 'jorani.*:ALL,GRANT'
|
||
|
state: present
|
||
|
|
||
|
- name: Create directory Jorani
|
||
|
ansible.builtin.file:
|
||
|
path: /var/www/html/jorani
|
||
|
state: directory
|
||
|
owner: www-data
|
||
|
group: www-data
|
||
|
mode: '0750'
|
||
|
|
||
|
- name: Download Jorani
|
||
|
unarchive:
|
||
|
src: https://github.com/bbalet/jorani/releases/download/v1.0.0/jorani-1.0.0.zip
|
||
|
dest: /var/www/html/jorani/
|
||
|
remote_src: yes
|