You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/roles/common/tasks/helpers.yml

42 lines
922 B
YAML

---
- name: Create directory for helper scripts
file:
path: "{{ global_helper_directory }}"
state: directory
owner: root
group: root
mode: "u=rwx,g=rx,o=rx"
- name: Upload helper scripts
copy:
src: "{{ item }}"
dest: "{{ global_helper_directory }}/{{ item }}"
owner: root
group: root
mode: "u=rwx,g=rx,o=rx"
loop:
- backup_rename.sh
- gpg_import_url_key.sh
- name: Build and upload template helper scripts
template:
src: "{{ item }}"
dest: "{{ global_helper_directory }}/{{ item }}"
owner: root
group: root
mode: "u=rwx,g=rx,o=rx"
loop:
- backup_autoremove.sh
- backup_files.sh
- backup_mysql_database.sh
- nsupdate_keygen.sh
- name: Configure auto remove older backups
cron:
hour: 0
minute: 30
job: "{{ global_helper_directory }}/backup_autoremove.sh"
name: "Auto remove older backups"
state: present