forked from ISTI-ansible-roles/ansible-roles
32 lines
1.3 KiB
YAML
32 lines
1.3 KiB
YAML
---
|
|
- name: Install and configure phpMyAdmin
|
|
block:
|
|
- name: Create the phpmyadmin download directory
|
|
file: dest={{ phpmyadmin_install_dir }} state=directory
|
|
|
|
- name: Create the phpmyadmin download, upload and tmp directories
|
|
file: dest={{ item }} state=directory owner={{ phpmyadmin_phpfpm_pool_user }} mode=0700
|
|
with_items:
|
|
- '{{ phpmyadmin_install_dir }}/upload'
|
|
- '{{ phpmyadmin_install_dir }}/download'
|
|
- '{{ phpmyadmin_install_dir }}/tmp'
|
|
|
|
- name: Download and unarchive the phpMyAdmin distribution
|
|
unarchive: remote_src=yes src={{ phpmyadmin_download_link }} dest={{ phpmyadmin_install_dir }}
|
|
args:
|
|
creates: '{{ phpmyadmin_install_dir }}/{{ phpmyadmin_app }}/index.php'
|
|
|
|
- name: Remove the test and setup directories
|
|
file: dest={{ phpmyadmin_install_dir }}/{{ phpmyadmin_app }}/{{ item }} state=absent
|
|
with_items:
|
|
- 'test'
|
|
- setup
|
|
|
|
- name: Set the path to the phpMyAdmin installation
|
|
file: src={{ phpmyadmin_install_dir }}/{{ phpmyadmin_app }} dest={{ phpmyadmin_phpfpm_doc_root }} state=link
|
|
|
|
- name: Install the phpMyAdmin config file
|
|
template: src=phpmyadmin-config.inc.php.j2 dest={{ phpmyadmin_phpfpm_doc_root }}/config.inc.php owner={{ phpmyadmin_phpfpm_pool_user }} group={{ phpmyadmin_phpfpm_pool_user }} mode=0440
|
|
|
|
tags: [ 'phpMyadmin', 'phpmyadmin' ]
|