ansible-infra/roles/dokuwiki/tasks/main.yml
June 03e994b41f
All checks were successful
/ Ansible Lint (push) Successful in 1m42s
dokuwiki: update role to support Debian 12
2024-12-08 18:37:41 +01:00

54 lines
1.5 KiB
YAML

- name: set php version to target
ansible.builtin.set_fact:
dokuwiki__php_version: '7.4'
when: dokuwiki__php_version is undefined and ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_major_version'] == "11"
- name: set php version to target
ansible.builtin.set_fact:
dokuwiki__php_version: '8.2'
when: dokuwiki__php_version is undefined and ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_major_version'] == "12"
- name: Install php-fpm
become: true
ansible.builtin.apt:
name:
- php-fpm
- php-xml
- php-mbstring
- php-zip
- php-intl
- php-gd
- php-sqlite3
diff: false
- name: Ensure `php-fpm` is enabled
become: true
ansible.builtin.systemd:
service: "php{{ dokuwiki__php_version }}-fpm.service"
enabled: true
- name: Create custom php-fpm pool
become: true
ansible.builtin.template:
src: "{{ role_path }}/templates/php-fpm-dokuwiki.conf"
dest: "/etc/php/{{ dokuwiki__php_version }}/fpm/pool.d/dokuwiki.conf"
mode: "0755"
notify: Restart php-fpm
- name: Create `/var/www` directory
become: true
ansible.builtin.file:
path: /var/www
state: directory
owner: "{{ dokuwiki__nginx_user }}"
group: "{{ dokuwiki__nginx_user }}"
mode: "0755"
- name: Allow more mime types to be uploaded
become: true
ansible.builtin.copy:
src: mime.local.conf
dest: /var/www/dokuwiki/conf/mime.local.conf
owner: root
group: root
mode: "0644"