* use appropriate php version both for php and apache installations
+ pma for apache with auth and hand made change granted permissions + wp-cli + www-domain alias for apache and revers redirect for that
This commit is contained in:
26
playbooks/own/phpmyadmin-apache-auth.yml
Normal file
26
playbooks/own/phpmyadmin-apache-auth.yml
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
|
||||
- name: Create phpmyadmin apache auth passwords file
|
||||
collections: [ 'debops.debops', 'debops.roles01',
|
||||
'debops.roles02', 'debops.roles03' ]
|
||||
hosts: [ 'debian10' ]
|
||||
tasks:
|
||||
- name: Import DebOps secret role
|
||||
ansible.builtin.import_role:
|
||||
name: 'secret'
|
||||
|
||||
- shell: |-
|
||||
cd /etc/apache2
|
||||
mkdir -p passwords.d
|
||||
|
||||
- name: 'Adding pma apache auth passwords files'
|
||||
shell: |-
|
||||
echo "{{ site_name }}:$(openssl passwd -apr1 {{ lookup("password", secret + "/basic/" + site_name + "/pma " + "length=30")}} )" > /etc/apache2/passwords.d/pma.passwords
|
||||
|
||||
- name: 'Change require all granted rule, because debops not present appropriate functional'
|
||||
shell: |-
|
||||
sed -i "s|Require all granted|Require valid-user|g" /etc/apache2/sites-available/pma.conf
|
||||
|
||||
- name: 'Restarting apache'
|
||||
shell: |-
|
||||
systemctl restart apache2
|
||||
Reference in New Issue
Block a user