You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.2 KiB
30 lines
1.2 KiB
---
|
|
|
|
- name: Install PhpMyAdmin
|
|
|
|
collections: [ 'debops.debops', 'debops.roles01',
|
|
'debops.roles02', 'debops.roles03' ]
|
|
|
|
hosts: [ 'debian10' ]
|
|
|
|
vars:
|
|
- phpmyadmin_version: 5.2.1
|
|
- blowfish_secret: lookup('community.general.random_string', length=12)
|
|
|
|
# Create phpmyadmin config for apache2
|
|
# TODO: Set blowfish_secret and make access rights for ./tmp directory
|
|
tasks:
|
|
- name: 'Download phpMyAdmin {{ phpmyadmin_version }} into var/www dir and uncompress'
|
|
become: true
|
|
become_user: '{{ site_name }}'
|
|
shell: |-
|
|
cd /var/www
|
|
rm -rf phpmyadmin
|
|
wget -q https://files.phpmyadmin.net/phpMyAdmin/{{ phpmyadmin_version }}/phpMyAdmin-{{ phpmyadmin_version }}-all-languages.zip
|
|
unzip -qq phpMyAdmin-{{ phpmyadmin_version }}-all-languages.zip
|
|
rm phpMyAdmin-{{ phpmyadmin_version }}-all-languages.zip
|
|
mv phpMyAdmin-{{ phpmyadmin_version }}-all-languages phpmyadmin
|
|
cd phpmyadmin
|
|
cp config.sample.inc.php config.inc.php
|
|
sed -i "s|'blowfish_secret'] = ''|'blowfish_secret'] = '{{ blowfish_secret }}'|g" config.inc.php
|
|
mkdir tmp && sudo chown :33 && chmod g+w tmp
|