Files

68 lines
1.3 KiB
YAML

---
- name: Install storage trimmer
copy:
src: trim_storage.sh
dest: /usr/local/bin/trim_storage.sh
tags:
- install
register: trim_storage
- name: Set permissions on trim_storage.sh
file:
path: /usr/local/bin/trim_storage.sh
mode: '0755'
tags:
- install
when: trim_storage.changed
- name: Create cronjob for trimming storage
ansible.builtin.cron:
name: TRIMSTORAGE
job: /usr/local/bin/trim_storage.sh
minute: "0"
hour: "*/6"
tags:
- configure
when: TRIM_STORAGE is defined and TRIM_STORAGE
- name: Install image puller
copy:
src: pull-images.sh
dest: /usr/local/bin/pull-images.sh
tags:
- install
register: pull_images
- name: Set permissions on pull-images.sh
file:
path: /usr/local/bin/pull-images.sh
mode: '0755'
tags:
- install
when: pull_images.changed
- name: Install tootctl wrapper script
copy:
src: tootctl
dest: /usr/local/bin/tootctl
tags:
- install
- name: Set permissions on tootctl
file:
path: /usr/local/bin/tootctl
mode: '0755'
tags:
- install
- name: Create cronjob for tootctl accounts prune
ansible.builtin.cron:
name: tootctl accounts prune
job: /usr/local/bin/tootctl accounts prune
weekday: "1"
minute: "0"
hour: "5"
tags:
- configure
when: PRUNE_ACCOUNTS is defined and PRUNE_ACCOUNTS