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

  1. ---
  2. - name: Install PhpMyAdmin
  3. collections: [ 'debops.debops', 'debops.roles01',
  4. 'debops.roles02', 'debops.roles03' ]
  5. hosts: [ 'debian10' ]
  6. vars:
  7. - phpmyadmin_version: 5.2.1
  8. - blowfish_secret: lookup('community.general.random_string', length=12)
  9. # Create phpmyadmin config for apache2
  10. # TODO: Set blowfish_secret and make access rights for ./tmp directory
  11. tasks:
  12. - name: 'Download phpMyAdmin {{ phpmyadmin_version }} into var/www dir and uncompress'
  13. become: true
  14. become_user: '{{ site_name }}'
  15. shell: |-
  16. cd /var/www
  17. rm -rf phpmyadmin
  18. wget -q https://files.phpmyadmin.net/phpMyAdmin/{{ phpmyadmin_version }}/phpMyAdmin-{{ phpmyadmin_version }}-all-languages.zip
  19. unzip -qq phpMyAdmin-{{ phpmyadmin_version }}-all-languages.zip
  20. rm phpMyAdmin-{{ phpmyadmin_version }}-all-languages.zip
  21. mv phpMyAdmin-{{ phpmyadmin_version }}-all-languages phpmyadmin
  22. cd phpmyadmin
  23. cp config.sample.inc.php config.inc.php
  24. sed -i "s|'blowfish_secret'] = ''|'blowfish_secret'] = '{{ blowfish_secret }}'|g" config.inc.php
  25. mkdir tmp && sudo chown :33 && chmod g+w tmp