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.
 
 

26 lines
893 B

---
- 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 "pma:$(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