78 lines
1.6 KiB
YAML
78 lines
1.6 KiB
YAML
- name: ensure rpmfusion repo is installed
|
|
package:
|
|
name: >-
|
|
https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-{{ ansible_distribution_version }}.noarch.rpm
|
|
tags:
|
|
- install
|
|
|
|
- name: ensure required packages are installed
|
|
package:
|
|
name: '{{ nextcloud_packages }}'
|
|
state: present
|
|
tags:
|
|
- install
|
|
|
|
- name: check nextcloud version
|
|
command: >-
|
|
php -r 'require "/usr/share/nextcloud/version.php";
|
|
echo join(".", $OC_Version);'
|
|
check_mode: false
|
|
changed_when: false
|
|
register: check_nc_version
|
|
tags:
|
|
- always
|
|
- name: set nc_version fact
|
|
set_fact:
|
|
nc_version: '{{ check_nc_version.stdout }}'
|
|
tags:
|
|
- always
|
|
|
|
- name: ensure nextcloud is configured
|
|
template:
|
|
src: config.php.j2
|
|
dest: /etc/nextcloud/config.php
|
|
mode: '0600'
|
|
owner: apache
|
|
group: apache
|
|
tags:
|
|
- config
|
|
- name: ensure php is configured for nextcloud
|
|
template:
|
|
src: php.ini.j2
|
|
dest: /etc/php.d/60-nextcloud.ini
|
|
mode: '0644'
|
|
notify:
|
|
- restart php-fpm
|
|
tags:
|
|
- php-config
|
|
|
|
- name: ensure php-fpm is configured for nextcloud
|
|
template:
|
|
src: www.php-fpm.conf.j2
|
|
dest: /etc/php-fpm.d/www.conf
|
|
mode: '0644'
|
|
notify:
|
|
- restart php-fpm
|
|
tags:
|
|
- php-fpm-config
|
|
|
|
- name: ensure apache is configured to serve nextcloud
|
|
template:
|
|
src: nextcloud.httpd.conf.j2
|
|
dest: /etc/httpd/conf.d/nextcloud.conf
|
|
mode: '0644'
|
|
notify: reload httpd
|
|
tags:
|
|
- apache-config
|
|
|
|
- name: ensure php-fpm starts at boot
|
|
service:
|
|
name: php-fpm
|
|
enabled: true
|
|
|
|
- meta: flush_handlers
|
|
- name: ensure php-fpm service is running
|
|
service:
|
|
name: php-fpm
|
|
state: started
|