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:
@@ -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' }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user