add more restic helper scripts
This commit is contained in:
		@@ -65,21 +65,17 @@
 | 
			
		||||
    - "{{ restic_etc_path }}/repos"
 | 
			
		||||
    - "{{ restic_etc_path }}/jobs"
 | 
			
		||||
 | 
			
		||||
- name: create restic job wrapper script
 | 
			
		||||
  template:
 | 
			
		||||
    src: restic-job.sh.j2
 | 
			
		||||
    dest: "{{ restic_bin_path }}/restic-job"
 | 
			
		||||
    owner: root
 | 
			
		||||
    group: root
 | 
			
		||||
    mode: 0755
 | 
			
		||||
 | 
			
		||||
- name: create restic tidy wrapper
 | 
			
		||||
  template:
 | 
			
		||||
    src: restic-tidy.sh.j2
 | 
			
		||||
    dest: "{{ restic_bin_path }}/restic-tidy"
 | 
			
		||||
- name: copy restic helper scripts
 | 
			
		||||
  copy:
 | 
			
		||||
    src: "{{ item }}"
 | 
			
		||||
    dest: "{{ restic_bin_path }}/{{ item | basename | splitext | first }}"
 | 
			
		||||
    owner: root
 | 
			
		||||
    group: root
 | 
			
		||||
    mode: 0755
 | 
			
		||||
  loop:
 | 
			
		||||
    - restic-tidy.sh
 | 
			
		||||
    - restic-repo.sh
 | 
			
		||||
    - restic-job.sh
 | 
			
		||||
 | 
			
		||||
- name: manage repos
 | 
			
		||||
  include: repo.yaml
 | 
			
		||||
 
 | 
			
		||||
@@ -36,6 +36,23 @@
 | 
			
		||||
    group: root
 | 
			
		||||
    mode: 0400
 | 
			
		||||
 | 
			
		||||
- name: symlink default repo
 | 
			
		||||
  block:
 | 
			
		||||
    - name: explicit default
 | 
			
		||||
      file:
 | 
			
		||||
        src: "{{ restic_etc_path }}/repos/{{ item.name }}"
 | 
			
		||||
        dest: "{{ restic_etc_path }}/repos/default"
 | 
			
		||||
        state: link
 | 
			
		||||
        force: yes
 | 
			
		||||
      when: item.default is defined and item.default == True
 | 
			
		||||
    - name: implicit default
 | 
			
		||||
      file:
 | 
			
		||||
        src: "{{ restic_etc_path }}/repos/{{ item.name }}"
 | 
			
		||||
        dest: "{{ restic_etc_path }}/repos/default"
 | 
			
		||||
        state: link
 | 
			
		||||
        force: yes
 | 
			
		||||
      when: restic_repos | count == 1
 | 
			
		||||
 | 
			
		||||
- name: create cron
 | 
			
		||||
  cron:
 | 
			
		||||
    name: "restic {{ item.name }} tidy"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user