* Fedora Minimal does not come with tar. Need installed for Telegraf. * First attempt at automating HTTP git server setup. * Add cron jobs to keep projects up to date. * Add new git playbook to server. * Add new server variables for git. Put all variables in a dictionary. * Put variables into run file. * Fix the loop variables to be dictionaries, not jinja. * Upgrade nanominer. * Attempt to fix templating error. * Attempt to fix templating error, but in the right spot this time. :) * Attempt another fix for building list of dictionaries. * Change strings to dicts. * Add quotes for jinja variables. * Remove extra curly brackets. * Fix the rest of the file's dictionaries now that General works. * Remove testing code. * Variablize ansible repo. Begin watching personal repos rather than pinging GitHub. * Fix variables to append, not replace. * Fix variable names. * Try to prevent variables from being strings, without getting formatting error. * Try to fix variables, again. * Fixed git.yml. Found a way to test locally and all is working now.
59 lines
1.9 KiB
YAML
59 lines
1.9 KiB
YAML
---
|
|
# Jobs relating to the ansible user.
|
|
|
|
- name: General | Cron | Ansible | Create Subscriber Job
|
|
cron:
|
|
user: ansible
|
|
name: "Ansible Sync"
|
|
minute: "*/30"
|
|
job: "sudo {{ ansible_pull_exec.stdout }} -o -U {{ repo_local }} --checkout {{ branch }}"
|
|
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 | sudo tee {{ heartbeat_report }}; sudo chmod 777 {{ heartbeat_report }}"
|
|
state: present
|
|
disabled: no
|
|
|
|
- name: General | Cron | Ansible | Enable Secure Copy Reports
|
|
cron:
|
|
user: ansible
|
|
name: "{{ item.name }}"
|
|
minute: "05,20,35,50"
|
|
job: "ls {{ item.src }} 2>/dev/null 1>&2 && sudo scp {{ item.src }} {{ item.dest }} && sudo sh -c 'rm -rfv {{ item.src }}'"
|
|
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
|