mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
initial checkin -- May 27, 2017
This commit is contained in:
commit
845632d0ac
488 changed files with 41559 additions and 0 deletions
2
roles/phpmyadmin/defaults/main.yml
Normal file
2
roles/phpmyadmin/defaults/main.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
phpmyadmin_install: True
|
||||
phpmyadmin_enabled: False
|
||||
47
roles/phpmyadmin/tasks/main.yml
Normal file
47
roles/phpmyadmin/tasks/main.yml
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
- name: Get the phpmyadmin software
|
||||
get_url: url="{{ xsce_download_url }}/{{ phpMyAdmin }}" dest="{{ downloads_dir}}/phpMyAdmin.zip"
|
||||
when: not {{ use_cache }} and not {{ no_network }}
|
||||
tags:
|
||||
- download2
|
||||
|
||||
- name: Copy it to permanent location /opt
|
||||
unarchive: src={{ downloads_dir }}/phpMyAdmin.zip dest=/opt/
|
||||
|
||||
- name: Create a symbolic link to the folder of the current version phpmyadmin
|
||||
file: path=/opt/phpmyadmin src=phpMyAdmin-4.2.7.1-all-languages state=link
|
||||
|
||||
- name: Copy the phpmyadmin config file into place
|
||||
template: src=config.inc.php dest=/opt/phpmyadmin/config.inc.php
|
||||
|
||||
- name: Change the owner of the php tree to apache
|
||||
shell: "chown -R apache /opt/phpmyadmin"
|
||||
|
||||
- name: Put the alias into Apache config when enabled
|
||||
template: src=phpmyadmin.j2 dest=/etc/{{ apache_config_dir }}/phpmyadmin.conf
|
||||
when: phpmyadmin_enabled
|
||||
|
||||
- name: Enable phpmyadmin
|
||||
file: path=/etc/apache2/sites-enabled/phpmyadmin.conf
|
||||
src=/etc/apache2/sites-available/phpmyadmin.conf
|
||||
state=link
|
||||
when: phpmyadmin_enabled and is_debian
|
||||
|
||||
- name: Remove the alias into Apache config when not enabled
|
||||
file: path=/etc/apache2/sites-enabled/phpmyadmin.conf
|
||||
state=absent
|
||||
when: not phpmyadmin_enabled and is_debian
|
||||
|
||||
- name: add phpmyadmin to service list
|
||||
ini_file: dest='{{ service_filelist }}'
|
||||
section=phpmyadmin
|
||||
option='{{ item.option }}'
|
||||
value='"{{ item.value }}"'
|
||||
with_items:
|
||||
- option: name
|
||||
value: phpMyAdmin
|
||||
- option: description
|
||||
value: '"phpMyAdmin is an interface with a mysql database written in php, and available to administer the database engine locally or across the network"'
|
||||
- option: path
|
||||
value: /opt/phpmyadmin
|
||||
- option: enabled
|
||||
value: "{{ phpmyadmin_enabled }}"
|
||||
29
roles/phpmyadmin/templates/config.inc.php
Normal file
29
roles/phpmyadmin/templates/config.inc.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
/*
|
||||
* Generated configuration file
|
||||
* Generated by: phpMyAdmin 4.2.7.1 setup script
|
||||
* Date: Wed, 27 Aug 2014 04:06:59 +0000
|
||||
*/
|
||||
|
||||
/* Servers configuration */
|
||||
$i = 0;
|
||||
|
||||
/* Server: School Server Mysql Database [1] */
|
||||
$i++;
|
||||
$cfg['Servers'][$i]['verbose'] = 'School Server Mysql Database';
|
||||
$cfg['Servers'][$i]['host'] = 'localhost';
|
||||
$cfg['Servers'][$i]['port'] = '';
|
||||
$cfg['Servers'][$i]['socket'] = '';
|
||||
$cfg['Servers'][$i]['connect_type'] = 'tcp';
|
||||
$cfg['Servers'][$i]['auth_type'] = 'cookie';
|
||||
$cfg['Servers'][$i]['user'] = 'root';
|
||||
$cfg['Servers'][$i]['password'] = '';
|
||||
|
||||
/* End of servers configuration */
|
||||
|
||||
$cfg['blowfish_secret'] = '53fd593a363ed4.99753154';
|
||||
$cfg['DefaultLang'] = 'en';
|
||||
$cfg['ServerDefault'] = 1;
|
||||
$cfg['UploadDir'] = '';
|
||||
$cfg['SaveDir'] = '';
|
||||
?>
|
||||
5
roles/phpmyadmin/templates/phpmyadmin.j2
Normal file
5
roles/phpmyadmin/templates/phpmyadmin.j2
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Alias /phpmyadmin /opt/phpmyadmin
|
||||
<Directory /opt/phpmyadmin>
|
||||
AllowOverride all
|
||||
require all granted
|
||||
</Directory>
|
||||
Loading…
Add table
Add a link
Reference in a new issue