aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2024-07-06 10:20:54 +0200
committerRomain Gonçalves <me@rgoncalves.se>2024-07-06 10:21:47 +0200
commit3194ffd5bd9d674f19ee49f8fbce406cdc9666aa (patch)
tree0ac19d43206c3c2968c9ccd3875ddae9a3fcc381 /roles
parent21d259bbf44138ea37d66719e26c290de59cbbef (diff)
downloadrules-3194ffd5bd9d674f19ee49f8fbce406cdc9666aa.tar.gz
feat(roles/nextcloud): manage email with occ
Diffstat (limited to 'roles')
-rw-r--r--roles/nextcloud/defaults/main.yml2
-rw-r--r--roles/nextcloud/occ.yml17
-rw-r--r--roles/nextcloud/tasks/main.yml8
3 files changed, 21 insertions, 6 deletions
diff --git a/roles/nextcloud/defaults/main.yml b/roles/nextcloud/defaults/main.yml
index c920a55..9d55b89 100644
--- a/roles/nextcloud/defaults/main.yml
+++ b/roles/nextcloud/defaults/main.yml
@@ -86,7 +86,7 @@ nextcloud__php_settings:
value: 4096
- section: opcache
option: opcache.interned_strings_buffer
- value: 8
+ value: 64
- section: opcache
option: opcache.max_accelerated_files
value: 10000
diff --git a/roles/nextcloud/occ.yml b/roles/nextcloud/occ.yml
index c881d30..e6f41f1 100644
--- a/roles/nextcloud/occ.yml
+++ b/roles/nextcloud/occ.yml
@@ -63,7 +63,7 @@
- occ
- user:add
- --password-from-env
- - "--display-name={{ item.fullname }}"
+ - "--display-name={{ item.display_name }}"
- "{{ item.username }}"
chdir: "{{ httpd_pre__chroot_dir }}/nextcloud"
environment:
@@ -78,3 +78,18 @@
- '"already exists" not in nextcloud__result_create_application_users.stdout'
changed_when:
- '"already exists" not in nextcloud__result_create_application_users.stdout'
+
+- name: update application users
+ ansible.builtin.command:
+ argv:
+ - "{{ nextcloud__php_bin }}"
+ - occ
+ - user:setting
+ - "{{ item.0.username }}"
+ - settings
+ - "{{ item.1 }}"
+ - "{{ item.0[item.1] }}"
+ chdir: "{{ httpd_pre__chroot_dir }}/nextcloud"
+ with_nested:
+ - "{{ nextcloud__users }}"
+ - ["email"]
diff --git a/roles/nextcloud/tasks/main.yml b/roles/nextcloud/tasks/main.yml
index 6eb5d21..1426d4b 100644
--- a/roles/nextcloud/tasks/main.yml
+++ b/roles/nextcloud/tasks/main.yml
@@ -48,10 +48,6 @@
ansible.builtin.import_tasks:
file: php.yml
-- name: import dependencies tasks
- ansible.builtin.import_tasks:
- file: dependencies.yml
-
- name: import database tasks
ansible.builtin.import_tasks:
file: database.yml
@@ -66,6 +62,10 @@
become_method: su
become_flags: -s /bin/sh
+- name: import dependencies tasks
+ ansible.builtin.import_tasks:
+ file: dependencies.yml
+
- name: enable nextcloud background jobs
ansible.builtin.cron:
name: nextcloud background jobs
remember that computers suck.