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

  1. ---
  2. - name: Create phpmyadmin apache auth passwords file
  3. collections: [ 'debops.debops', 'debops.roles01',
  4. 'debops.roles02', 'debops.roles03' ]
  5. hosts: [ 'debian10' ]
  6. tasks:
  7. - name: Import DebOps secret role
  8. ansible.builtin.import_role:
  9. name: 'secret'
  10. - shell: |-
  11. cd /etc/apache2
  12. mkdir -p passwords.d
  13. - name: 'Adding pma apache auth passwords files'
  14. shell: |-
  15. echo "pma:$(openssl passwd -apr1 {{ lookup("password", secret + "/basic/" + site_name + "/pma " + "length=30")}} )" > /etc/apache2/passwords.d/pma.passwords
  16. - name: 'Change require all granted rule, because debops not present appropriate functional'
  17. shell: |-
  18. sed -i "s|Require all granted|Require valid-user|g" /etc/apache2/sites-available/pma.conf
  19. - name: 'Restarting apache'
  20. shell: |-
  21. systemctl restart apache2