69 lines
2.2 KiB
YAML
Raw Normal View History

---
# Jobs relating to the ansible user.
- name: General | Cron | Ansible | Create Subscriber Job
cron:
2021-01-10 15:52:21 -06:00
user: ansible
name: "Ansible Sync"
minute: "*/15"
2021-02-03 21:32:03 -06:00
job: "sudo {{ ansible_pull_exec.stdout }} -o -U https://github.com/Hyperling/ansible.git"
2020-12-21 05:53:22 -06:00
state: present
2021-01-16 15:42:56 -06:00
disabled: no
- name: General | Cron | Ansible | Create Forced Weekly Subscriber Job
cron:
user: ansible
name: "Ansible Weekly Forced Sync"
2021-02-11 11:09:09 -06:00
special_time: weekly
2021-02-15 09:47:07 -06:00
job: "{{ user_root.home }}/bin/scm.sh"
state: present
disabled: no
- name: General | Cron | Ansible | Create Heartbeat Job
cron:
user: ansible
2021-02-07 13:49:31 -06:00
name: "Create Heartbeat Report"
minute: "*/15"
job: "neofetch --stdout | sudo tee {{ heartbeat_report }}; sudo chmod 777 {{ heartbeat_report }}"
state: present
disabled: no
2021-02-07 13:49:31 -06:00
#TODO Deleteme
- name: General | Cron | Ansible | Enable Secure Copy Reports
cron:
user: ansible
name: "Copy Reports"
minute: "05,20,35,50"
job: "sudo scp {{ ansible_pull_report }} {{ heartbeat_report }} {{ lynis_report }} {{ nmap_report }} {{ leet_ssh }}:{{ report_scp_location }}"
state: absent
disabled: no
when: not leet_drive_details.stat.exists
- name: General | Cron | Ansible | Enable Secure Copy Reports
cron:
user: ansible
name: "{{ item.name }}"
minute: "05,20,35,50"
job: "sudo scp {{ item.src }} {{ item.dest }}"
state: present
disabled: no
loop:
2021-02-07 09:29:24 -06:00
- { name: 'Ansible Pull Report', src: '{{ ansible_pull_report }}', dest: '{{ ansible_pull_report_scp }}' }
- { name: 'Heartbeat Report', src: '{{ heartbeat_report }}', dest: '{{ heartbeat_report_scp }}' }
- { name: 'Lynis Report', src: '{{ lynis_report }}', dest: '{{ lynis_report_scp }}' }
- { name: 'NMap Report', src: '{{ nmap_report }}', dest: '{{ nmap_report_scp }}' }
when: not leet_drive_details.stat.exists
- name: General | Cron | Ansible | Disable Secure Copy Reports
cron:
user: ansible
2021-02-07 09:01:40 -06:00
name: "{{ item.name }}"
job: "As a wise man once said, I'm disabled."
state: absent
2021-02-11 11:11:14 -06:00
#disabled: yes
2021-02-07 09:01:40 -06:00
loop:
2021-02-07 09:04:46 -06:00
- { name: 'Ansible Pull Report' }
- { name: 'Heartbeat Report' }
- { name: 'Lynis Report' }
- { name: 'NMap Report' }
when: leet_drive_details.stat.exists