From: rominique Date: Mon, 15 Jul 2024 16:16:13 +0000 (+0200) Subject: repartissement des background job cron nuage X-Git-Url: http://git.cyclocoop.org/wiki/Http://www.example.com?a=commitdiff_plain;p=lhc%2Fansible.git repartissement des background job cron nuage --- diff --git a/tasks/config_nuage.yml b/tasks/config_nuage.yml index 46ba017..ce1cb6e 100644 --- a/tasks/config_nuage.yml +++ b/tasks/config_nuage.yml @@ -283,10 +283,11 @@ # role: "{{ nextcloud_php_user }}" # name: "GRANT SELECT ON pg_database TO php_{{ SIGLE }}_nuage;" +# on rend aléatoire la minutes de l'heure à laquelle les tâches d'arriere plan nextcloud tournent entre les différentes instance pour répartir la charge - name: Creation d'un fichier cron pour /etc/cron.d ansible.builtin.cron: name: "nextcloud {{ SIGLE }}_{{ config_ss_domain }} taches d'arriere plan toutes les 5 mins" - minute: "*/5" + minute: "{{ 5 | random }}-59/5" user: "php_{{ SIGLE }}_{{ config_ss_domain }}" job: "{{ nextcloud_webroot }}/cron"