├── README.md ├── templates └── adminer.conf.j2 ├── meta └── main.yml └── tasks └── main.yml /README.md: -------------------------------------------------------------------------------- 1 | Ansible Role: Apache Adminer 2 | ========= 3 | 4 | Install Apache config for [geerlingguy.adminer](https://github.com/geerlingguy/ansible-role-adminer) to work on URL: `/adminer`. 5 | -------------------------------------------------------------------------------- /templates/adminer.conf.j2: -------------------------------------------------------------------------------- 1 | Alias /adminer "{{ adminer_install_dir }}" 2 | 3 | DirectoryIndex adminer.php 4 | {% if apache_vhosts_version == "2.2" %} 5 | Order allow,deny 6 | Allow from all 7 | {% else %} 8 | Require all granted 9 | {% endif %} 10 | 11 | -------------------------------------------------------------------------------- /meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - geerlingguy.apache 4 | - geerlingguy.adminer 5 | 6 | galaxy_info: 7 | author: Tomáš Bedřich 8 | description: Apache Adminer config 9 | company: tbedrich.cz 10 | 11 | license: MIT 12 | min_ansible_version: 1.6 13 | 14 | platforms: 15 | - name: EL 16 | versions: 17 | - all 18 | - name: Ubuntu 19 | versions: 20 | - all 21 | - name: Debian 22 | versions: 23 | - all 24 | 25 | galaxy_tags: [] 26 | -------------------------------------------------------------------------------- /tasks/main.yml: -------------------------------------------------------------------------------- 1 | # copied from roles/geerlingguy.adminer/tasks/main.yml#L23 2 | 3 | - name: Set the proper Apache configuration directory (Debian). 4 | set_fact: 5 | apache_extra_conf_dir: "{{ 'conf-enabled' if apache_vhosts_version == '2.4' else 'conf.d' }}" 6 | when: ansible_os_family == 'Debian' 7 | 8 | - name: Add Apache configuration file for Adminer (Debian). 9 | template: 10 | src: adminer.conf.j2 11 | dest: "{{ apache_conf_path }}/{{ apache_extra_conf_dir }}/adminer.conf" 12 | when: ansible_os_family == 'Debian' 13 | notify: restart apache 14 | 15 | - name: Add Apache configuration file for Adminer (RedHat). 16 | template: 17 | src: adminer.conf.j2 18 | dest: "{{ apache_conf_path }}/adminer.conf" 19 | when: ansible_os_family == 'RedHat' 20 | notify: restart apache 21 | --------------------------------------------------------------------------------