2021-01-31 17:21:39 -06:00
|
|
|
---
|
2021-02-03 21:17:48 -06:00
|
|
|
# Jobs relating to the ansible user.
|
2021-01-31 17:21:39 -06:00
|
|
|
|
2021-02-03 21:17:48 -06:00
|
|
|
- name: General | Cron | Ansible | Create Subscriber Job
|
2020-12-21 04:50:02 -06:00
|
|
|
cron:
|
2021-01-10 15:52:21 -06:00
|
|
|
user: ansible
|
2020-12-21 04:50:02 -06:00
|
|
|
name: "Ansible Sync"
|
2021-01-31 16:28:51 -06:00
|
|
|
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
|
2021-02-06 07:16:19 -06:00
|
|
|
|
|
|
|
- name: General | Cron | Ansible | Create Heartbeat Job
|
|
|
|
cron:
|
|
|
|
user: ansible
|
2021-02-06 07:49:11 -06:00
|
|
|
name: "Heartbeat Report"
|
2021-02-06 07:16:19 -06:00
|
|
|
minute: "*/15"
|
2021-02-06 09:58:18 -06:00
|
|
|
job: "sudo touch {{ heartbeat_report }}; chmod 777 {{ heartbeat_report }}"
|
2021-02-06 07:16:19 -06:00
|
|
|
state: present
|
|
|
|
disabled: no
|
2021-02-06 09:58:18 -06:00
|
|
|
|
|
|
|
- name: General | Cron | Ansible | Enable Secure Copy Reports
|
|
|
|
cron:
|
|
|
|
user: ansible
|
|
|
|
name: "Copy Reports"
|
|
|
|
minute: "05,20,35,50"
|
2021-02-07 07:26:54 -06:00
|
|
|
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
|
2021-02-07 07:28:48 -06:00
|
|
|
name: "{{ item.name }}"
|
2021-02-07 07:26:54 -06:00
|
|
|
minute: "05,20,35,50"
|
|
|
|
job: "sudo scp {{ item.src }} {{ item.dest }}"
|
2021-02-06 09:58:18 -06:00
|
|
|
state: present
|
|
|
|
disabled: no
|
2021-02-07 07:26:54 -06:00
|
|
|
loop:
|
|
|
|
- { name: 'Ansible Pull Report', src: '{{ ansible_pull_report_scp }}', dest: '{{ ansible_pull_report }}' }
|
|
|
|
- { name: 'Heartbeat Report', src: '{{ heartbeat_report_scp }}', dest: '{{ heartbeat_report }}' }
|
|
|
|
- { name: 'Lynis Report', src: '{{ lynis_report_scp }}', dest: '{{ lynis_report }}' }
|
|
|
|
- { name: 'NMap Report', src: '{{ nmap_report_scp }}', dest: '{{ nmap_report }}' }
|
2021-02-06 09:58:18 -06:00
|
|
|
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 }}"
|
2021-02-06 09:58:18 -06:00
|
|
|
job: "As a wise man once said, I'm disabled."
|
|
|
|
state: present
|
|
|
|
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' }
|
2021-02-06 09:58:18 -06:00
|
|
|
when: leet_drive_details.stat.exists
|