--- # Jobs relating to the ansible user. - name: General | Cron | Ansible | Create Subscriber Job cron: user: ansible name: "Ansible Sync" minute: "*/15" job: "sudo {{ ansible_pull_exec.stdout }} -o -U https://github.com/Hyperling/ansible.git" state: present disabled: no - name: General | Cron | Ansible | Create Forced Weekly Subscriber Job cron: user: ansible name: "Ansible Weekly Forced Sync" special_time: weekly job: "{{ user_root.home }}/bin/scm.sh" state: present disabled: no - name: General | Cron | Ansible | Create Heartbeat Job cron: user: ansible name: "Create Heartbeat Report" minute: "*/15" job: "neofetch --stdout | tee {{ heartbeat_report }}; chmod 777 {{ heartbeat_report }}" state: present disabled: no #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: - { 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 name: "{{ item.name }}" job: "As a wise man once said, I'm disabled." state: absent #disabled: yes loop: - { name: 'Ansible Pull Report' } - { name: 'Heartbeat Report' } - { name: 'Lynis Report' } - { name: 'NMap Report' } when: leet_drive_details.stat.exists