+ refactored and solve some problems with mariadb and nginx playbook
+ apps playbooks - docker, caprover * simple refactore starter scripts + apt update debops playboook prepend launch by default * sury repo changed * database users locked to localhost only * phpmyadmin blowfish generate secret fix
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
|
||||
vars:
|
||||
- phpmyadmin_version: 5.2.1
|
||||
# https://docs.ansible.com/ansible/latest/collections/community/general/random_string_lookup.html#keyword-parameters
|
||||
- blowfish_secret: "{{ lookup('community.general.random_string', length=32) }}"
|
||||
|
||||
tasks:
|
||||
@ -24,5 +25,17 @@
|
||||
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 tmp && chmod g+w tmp
|
||||
|
||||
- name: 'Set cookie blowfish secret'
|
||||
# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/replace_module.html
|
||||
replace:
|
||||
path: /var/www/phpmyadmin/config.inc.php
|
||||
regexp: "'blowfish_secret'] = ''"
|
||||
replace: "'blowfish_secret'] = '{{ blowfish_secret | replace('\'', '\\\'') }}'\n\n$cfg['CookieSameSite'] = 'Lax';\n"
|
||||
|
||||
- name: 'Set MaxTableList'
|
||||
replace:
|
||||
path: /var/www/phpmyadmin/config.inc.php
|
||||
regexp: "^//$cfg['MaxRows'](.*)"
|
||||
replace: "//$cfg['MaxRows']\1\n\n$cfg['MaxTableList'] = 500;\n"
|
||||
|
||||
Reference in New Issue
Block a user