---
- dnf: name=duply state=latest
  become: true
  tags:
  - packages

- file: path=~/.duply/{{ item.name }}
        state=directory mode=0700
  with_items: "{{ backup_sets }}"

- template: src="conf" dest=~/.duply/{{ item.name }}/conf
  with_items: "{{ backup_sets }}"

- template: src="exclude" dest=~/.duply/{{ item.name }}/exclude
  with_items: "{{ backup_sets }}"

- copy: src="{{ item[0] }}" dest=~/.duply/{{ item[1].name }}/{{ item[0] }}
  with_nested:
  -
    - pre
    - post
  - "{{ backup_sets }}"

- cron: name={{ item.name }} minute={{ item.on_minute }}
        job="/usr/bin/duply {{ item.name }} pre+bkp_post_cleanup --force"
  with_items: "{{ backup_sets }}"

---
- dnf: name=duply state=latest
  become: true
  tags:
  - packages

- file: path=~/.duply/{{ item.name }}
        state=directory mode=0700
  with_items: "{{ backup_sets }}"

- template: src="conf" dest=~/.duply/{{ item.name }}/conf
  with_items: "{{ backup_sets }}"

- template: src="exclude" dest=~/.duply/{{ item.name }}/exclude
  with_items: "{{ backup_sets }}"

- copy: src="{{ item[0] }}" dest=~/.duply/{{ item[1].name }}/{{ item[0] }}
  with_nested:
  -
    - pre
    - post
  - "{{ backup_sets }}"

- cron: name={{ item.name }} minute={{ item.on_minute }}
        job="/usr/bin/duply {{ item.name }} pre+bkp_post_cleanup --force"
  with_items: "{{ backup_sets }}"

- cron: name=lock_cleanup minute=0
        job="find ~/.cache/duplicity/ -type f -name lockfile.lock -mmin +240 -delete"

Add mopup for lockfiles that are older than 6hrs
Add mopup for lockfiles that are older than 6hrs
