Change structure

This commit is contained in:
2026-11-15 13:17:19 +03:00
parent bdc70b0a8e
commit d4dee416c3
21 changed files with 21 additions and 26 deletions
+10
View File
@@ -0,0 +1,10 @@
# NextCloud
This task for Up NextCloud Service.
For Debian distributions.
default attributes:
1. `nextcloud_version` - Nextcloud version. Use for download for offical web site.
2. `packages` - Name applications for install via apt.
+61
View File
@@ -0,0 +1,61 @@
---
nextcloud_version: "34.0.3"
packages:
- vim
- curl
- wget
- bzip2
- unzip
- iperf3
- tcpdump
- apache2
- libapache2-mod-php8.4
- php-apcu
- php-bcmath
- php-bz2
- php-cli
- php-common
- php-curl
- php-dev
- php-fpm
- php-gd
- php-gmp
- php-imagick
- php-intl
- php-json
- php-mbstring
- php-mysql
- php-pear
- php-redis
- php-soap
- php-xml
- php-zip
- php8.4-apcu
- php8.4-bcmath
- php8.4-bz2
- php8.4-cli
- php8.4-common
- php8.4-curl
- php8.4-dev
- php8.4-fpm
- php8.4-gd
- php8.4-gmp
- php8.4-igbinary
- php8.4-imagick
- php8.4-intl
- php8.4-mbstring
- php8.4-mysql
- php8.4-opcache
- php8.4-readline
- php8.4-redis
- php8.4-soap
- php8.4-xml
- php8.4-zip
- php8.4
- php
- pkg-php-tools
- php-sqlite3
+6
View File
@@ -0,0 +1,6 @@
---
- name: "restart apache2"
ansible.builtin.systemd:
name: apache2
state: restarted
@@ -0,0 +1,36 @@
---
- name: "Change document root in default site"
ansible.builtin.replace:
path: /etc/apache2/sites-available/000-default.conf
regexp: 'DocumentRoot /var/www/html'
replace: 'DocumentRoot /var/www/nextcloud'
backup: yes
notify: "restart apache2"
- name: "Configure php - upload_max_filesize"
ansible.builtin.replace:
path: /etc/php/8.4/apache2/php.ini
regexp: "upload_max_filesize = 2M"
replace: "upload_max_filesize = 1G"
backup: yes
# changed_when: "'upload_max_filesize = 1G' in lookup('file', '/etc/php/8.4/apache2/php.ini')"
notify: "restart apache2"
- name: "Configure php - memory_limit"
ansible.builtin.replace:
path: /etc/php/8.4/apache2/php.ini
regexp: "memory_limit = 128M"
replace: "memory_limit = 1G"
backup: yes
# changed_when: "'memory_limit = 1G' in lookup('file', '/etc/php/8.4/apache2/php.ini')"
notify: "restart apache2"
- name: "Configure php - output_buffering"
ansible.builtin.replace:
path: /etc/php/8.4/apache2/php.ini
regexp: "output_buffering = 4096"
replace: "output_buffering = off"
backup: yes
# changed_when: "'output_buffering = off' in lookup('file', '/etc/php/8.4/apache2/php.ini')"
notify: "restart apache2"
@@ -0,0 +1,18 @@
---
- name: "unzip archive"
ansible.builtin.unarchive:
src: "https://download.nextcloud.com/server/releases/nextcloud-{{ nextcloud_version }}.zip"
dest: "/var/www/"
owner: www-data
group: www-data
creates: "/var/www/nextcloud"
remote_src: true
- name: "Create nextcloud data directory"
ansible.builtin.file:
state: directory
path: /var/www/nextcloud-data
owner: www-data
group: www-data
mode: '0700'
@@ -0,0 +1,7 @@
---
- name: "Install packages"
ansible.builtin.apt:
name: "{{ packages }}"
update_cache: true
register: deps_installed
+10
View File
@@ -0,0 +1,10 @@
---
- name: "Install packages"
ansible.builtin.include_tasks: install_packages.yml
- name: "Download NextCloud"
ansible.builtin.include_tasks: download_nextcloud.yml
- name: "Configure Apache2"
ansible.builtin.include_tasks: configure_apache2.yml