2017-10-27 14:32:45 +00:00
- name : Get the phpMyAdmin software
2017-10-20 04:36:10 +00:00
get_url : url="{{ iiab_download_url }}/{{ phpMyAdmin }}" dest="{{ downloads_dir }}/phpMyAdmin.zip"
2017-10-19 06:33:02 +00:00
when : internet_available
2017-05-27 18:09:50 +00:00
- name : Copy it to permanent location /opt
unarchive : src={{ downloads_dir }}/phpMyAdmin.zip dest=/opt/
2017-10-27 14:32:45 +00:00
- name : Create a symbolic link to the folder of the current version phpMyAdmin
2017-10-27 05:01:02 +00:00
file : path=/opt/phpmyadmin src=phpMyAdmin-4.7.5-all-languages state=link
2017-05-27 18:09:50 +00:00
2017-10-27 14:32:45 +00:00
- name : Copy the phpMyAdmin config file into place
2017-05-27 18:09:50 +00:00
template : src=config.inc.php dest=/opt/phpmyadmin/config.inc.php
2017-10-27 14:32:45 +00:00
- name : Change the owner of the PHP tree to Apache
2017-06-09 23:25:56 +00:00
shell : "chown -R {{ apache_user }} /opt/phpmyadmin"
2017-05-27 18:09:50 +00:00
- name : Put the alias into Apache config when enabled
template : src=phpmyadmin.j2 dest=/etc/{{ apache_config_dir }}/phpmyadmin.conf
when : phpmyadmin_enabled
2017-10-27 14:32:45 +00:00
- name : Enable phpMyAdmin
2017-05-27 18:09:50 +00:00
file : path=/etc/apache2/sites-enabled/phpmyadmin.conf
src=/etc/apache2/sites-available/phpmyadmin.conf
state=link
2017-05-27 23:10:45 +00:00
when : phpmyadmin_enabled and is_debuntu
2017-05-27 18:09:50 +00:00
- name : Remove the alias into Apache config when not enabled
file : path=/etc/apache2/sites-enabled/phpmyadmin.conf
state=absent
2017-05-27 23:10:45 +00:00
when : not phpmyadmin_enabled and is_debuntu
2017-05-27 18:09:50 +00:00
2017-10-27 14:32:45 +00:00
- name : Add phpmyadmin to service list
2017-05-27 18:09:50 +00:00
ini_file : dest='{{ service_filelist }}'
section=phpmyadmin
option='{{ item.option }}'
value='"{{ item.value }}"'
with_items :
- option : name
value : phpMyAdmin
- option : description
2017-10-27 14:32:45 +00:00
value : '"phpMyAdmin is an interface with a MySQL database written in PHP, and available to administer the database engine locally or across the network."'
2017-05-27 18:09:50 +00:00
- option : path
value : /opt/phpmyadmin
- option : enabled
value : "{{ phpmyadmin_enabled }}"