[TIDY] Update to ansible 4 module names
This commit is contained in:
parent
3c1939f431
commit
a2fc598416
19 changed files with 89 additions and 89 deletions
|
|
@ -6,7 +6,7 @@
|
|||
# - borgbackup_hostname
|
||||
|
||||
- name: borgbackup - Install
|
||||
include_tasks: "{{ item }}"
|
||||
ansible.builtin.include_tasks: "{{ item }}"
|
||||
with_first_found:
|
||||
- "borgbackup-{{ ansible_distribution }}.{{ ansible_distribution_release }}.yml"
|
||||
- "borgbackup-{{ ansible_distribution }}.yml"
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
# copy backup script and enable cronjob
|
||||
- name: borgbackup - Copy Borgbackup script
|
||||
become: yes
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/borgbackup.sh"
|
||||
dest: /usr/local/bin/borgbackup.sh
|
||||
owner: "{{ ansible_user_id }}"
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
- borgbackup_hostname is defined
|
||||
- name: borgbackup - Run Borgbackup script at 1:00 daily
|
||||
become: yes
|
||||
cron:
|
||||
ansible.builtin.cron:
|
||||
name: "Create Backup"
|
||||
minute: "0"
|
||||
hour: "1"
|
||||
|
|
@ -47,12 +47,12 @@
|
|||
block:
|
||||
- name: borgbackup - Remove Borgbackup script if no borgbackup config
|
||||
become: yes
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: /usr/local/bin/borgbackup.sh
|
||||
state: absent
|
||||
- name: borgbackup - Remove Cronjob if no borgbackup config
|
||||
become: yes
|
||||
cron:
|
||||
ansible.builtin.cron:
|
||||
name: "Create Backup"
|
||||
minute: "0"
|
||||
hour: "1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue