ansible, remove the date from the log file name since that's about when the logs stopped appearing anywhere at all.

This commit is contained in:
me
2026-10-02 10:25:24 -07:00
parent d01227fcde
commit ba98477576
+4 -3
View File
@@ -10,14 +10,15 @@
- name: General | Cron | Ansible | Facts - name: General | Cron | Ansible | Facts
set_fact: set_fact:
ansible_cron_log: "~/{{ ansible_hostname }}.ansible-pull.`date +'%Y%m%d-%H%M%S'`.log" #ansible_cron_log: "~/{{ ansible_hostname }}.ansible-pull.`date +'%Y%m%d-%H%M%S'`.log"
ansible_cron_log: "~/{{ ansible_hostname }}.ansible-pull.log"
- name: General | Cron | Ansible | Create Subscriber Job - name: General | Cron | Ansible | Create Subscriber Job
cron: cron:
user: ansible user: ansible
name: "Ansible Sync" name: "Ansible Sync"
minute: "*/30" minute: "*/30"
job: "bash -c 'sleep $(( $RANDOM / 20 )); sudo {{ ansible_pull_exec.stdout }} -v -o -U {{ git_repo_http }} --checkout {{ branch }} >{{ ansible_cron_log }} 2>&1'" job: "bash -c 'sleep $(( $RANDOM / 20 )); sudo {{ ansible_pull_exec.stdout }} -v -o -U {{ git_repo_http }} --checkout {{ branch }} >>{{ ansible_cron_log }} 2>&1'"
state: present state: present
disabled: "{{ 'yes' if no_telem else 'no' }}" disabled: "{{ 'yes' if no_telem else 'no' }}"
@@ -26,6 +27,6 @@
user: ansible user: ansible
name: "Ansible Weekly Forced Sync" name: "Ansible Weekly Forced Sync"
special_time: weekly special_time: weekly
job: "bash -c 'sleep $(( $RANDOM / 1 )); sudo {{ ansible_pull_exec.stdout }} -v -U {{ git_repo_http }} --checkout {{ branch }} >{{ ansible_cron_log }} 2>&1'" job: "bash -c 'sleep $(( $RANDOM / 1 )); sudo {{ ansible_pull_exec.stdout }} -v -U {{ git_repo_http }} --checkout {{ branch }} >>{{ ansible_cron_log }} 2>&1'"
state: present state: present
disabled: "{{ 'yes' if no_telem else 'no' }}" disabled: "{{ 'yes' if no_telem else 'no' }}"