69 lines
1.4 KiB
YAML
69 lines
1.4 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: ensure nextcloud database user exists
|
|
become: true
|
|
become_user: postgres
|
|
postgresql_user:
|
|
name: nextcloud
|
|
password: '{{ nextcloud_db_password }}'
|
|
state: present
|
|
- name: ensure nextcloud database exists
|
|
become: true
|
|
become_user: postgres
|
|
postgresql_db:
|
|
name: nextcloud
|
|
owner: nextcloud
|
|
state: present
|
|
|
|
- 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-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
|