Fix cronjobs to use BASH for RANDOM variable.

This commit is contained in:
2025-10-19 21:41:59 -07:00
parent 7c93f25a5d
commit 0d3931d738

View File

@@ -12,7 +12,7 @@
user: ansible user: ansible
name: "Ansible Sync" name: "Ansible Sync"
minute: "*/30" minute: "*/30"
job: "sleep $(( $RANDOM / 20 )); sudo {{ ansible_pull_exec.stdout }} -v -o -U {{ git_repo_http }} --checkout {{ branch }}" job: "bash -c 'sleep $(( $RANDOM / 20 )); sudo {{ ansible_pull_exec.stdout }} -v -o -U {{ git_repo_http }} --checkout {{ branch }}'"
state: present state: present
disabled: "{{ 'yes' if no_telem else 'no' }}" disabled: "{{ 'yes' if no_telem else 'no' }}"
@@ -21,6 +21,6 @@
user: ansible user: ansible
name: "Ansible Weekly Forced Sync" name: "Ansible Weekly Forced Sync"
special_time: daily special_time: daily
job: "sleep $(( $RANDOM / 1 )); sudo {{ ansible_pull_exec.stdout }} -v -U {{ git_repo_http }} --checkout {{ branch }}" job: "bash -c 'sleep $(( $RANDOM / 1 )); sudo {{ ansible_pull_exec.stdout }} -v -U {{ git_repo_http }} --checkout {{ branch }}'"
state: present state: present
disabled: "{{ 'yes' if no_telem else 'no' }}" disabled: "{{ 'yes' if no_telem else 'no' }}"