ansible_playbooks/roles/auspex/tasks/main.yml
2026-07-21 14:37:34 +03:00

82 lines
1.7 KiB
YAML
Executable file

---
- name: Copy auspex from cloud
ansible.builtin.get_url:
url: ""
dest: "{{ auspex_bin }}"
owner: root
group: root
mode: '0744'
timeout: 60
force: true
retries: 3
delay: 10
- name: Create cron task for auspex cert checker
ansible.builtin.cron:
name: "Run auspex cert checker"
minute: "0"
hour: "9"
day: "*"
month: "*"
weekday: "*"
job: "{{ auspex_bin }} -c"
user: root
- name: Create cron task for auspex port checker
ansible.builtin.cron:
name: "Run auspex port checker"
minute: "*/16"
hour: "*"
day: "*"
month: "*"
weekday: "*"
job: "{{ auspex_bin }} -p"
user: root
- name: Create cron task for auspex match checker
ansible.builtin.cron:
name: "Run auspex match checker"
minute: "*/11"
hour: "*"
day: "*"
month: "*"
weekday: "*"
job: "{{ auspex_bin }} -m"
user: root
- name: Create cron task for auspex logs checker
ansible.builtin.cron:
name: "Run auspex logs checker"
minute: "*/30"
hour: "*"
day: "*"
month: "*"
weekday: "*"
job: "{{ auspex_bin }} -l"
user: root
- name: Copy auspex on and off scripts
ansible.builtin.template:
src: "{{ item }}"
dest: "/usr/local/bin/{{ (item | basename).removesuffix('.j2') }}"
owner: root
group: root
mode: '0744'
loop: "{{ query('fileglob', 'templates/*.sh.j2') }}"
- name: Create directory /etc/auspex
ansible.builtin.file:
path: /etc/auspex
state: directory
owner: root
group: root
mode: '0755'
- name: Create .env
ansible.builtin.template:
src: auspex.env.j2
dest: /etc/auspex/auspex.env
owner: root
group: root
mode: '0600'
...