mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 12:57:21 +00:00
restic changes
This commit is contained in:
1 parent
b2d9c419c9
commit
cf426fa330
4 files changed
+25
-9
No files matched your search
@@ -2,10 +2,6 @@
|
||||
- name: Install scoop
|
||||
tags: install_scoop
|
||||
block:
|
||||
#- name: download install script
|
||||
# ansible.windows.win_powershell:
|
||||
# script: |
|
||||
# irm get.scoop.sh -outfile 'C:\eidf\install.ps1'
|
||||
- name: Run install script
|
||||
win_shell: |
|
||||
powershell Invoke-RestMethod -Uri https://get.scoop.sh -outfile 'C:\eidf\install.ps1'
|
||||
@@ -34,14 +30,29 @@
|
||||
win_shell: scoop install resticprofile
|
||||
tags: install_resticprofile
|
||||
|
||||
- name: Ensure parent directory exists
|
||||
ansible.windows.win_file:
|
||||
path: "C:\\resticprofile"
|
||||
state: directory
|
||||
tags: copy_restickey
|
||||
|
||||
- name: Copy restic key
|
||||
ansible.windows.win_copy:
|
||||
content: "{{ restic_password }}"
|
||||
dest: "C:\\resticprofile\\restic.key"
|
||||
force: false
|
||||
tags: copy_restickey
|
||||
|
||||
- name: Copy resticprofile
|
||||
ansible.windows.win_template:
|
||||
src: "profiles.yaml"
|
||||
dest: "C:\\resticprofile"
|
||||
dest: "C:\\resticprofile\\"
|
||||
force: true
|
||||
tags: copy_resticprofile
|
||||
|
||||
- name: Schedule resticprofile
|
||||
win_shell: resticprofile -n study_data schedule
|
||||
tags: schedule_resticprofile
|
||||
tags:
|
||||
- schedule_resticprofile
|
||||
- never
|
||||
when: inventory_hostname in groups['meta-name_fs01']
|
||||
@@ -10,13 +10,15 @@ profiles:
|
||||
default:
|
||||
repository: local:C:\eidf\restic-repo
|
||||
password-file: C:\resticprofile\restic.key
|
||||
insecure-tls: true
|
||||
|
||||
env:
|
||||
RESTIC_PATH:
|
||||
|
||||
study_data:
|
||||
inherit: default
|
||||
repository: local:C:\eidf\restic-repo
|
||||
repository: rest:https://{{ restic_user }}:{{ restic_rest_password }}@{{ backup_server_ip }}:8000
|
||||
initialize: true
|
||||
|
||||
backup:
|
||||
source: S:\
|
||||
@@ -30,7 +32,6 @@ profiles:
|
||||
- S:\System Volume Information
|
||||
- S:\DfsrPrivate
|
||||
tag:
|
||||
- study_data
|
||||
- "{{ os_project }}-{{ win_project }}"
|
||||
|
||||
retention:
|
||||
@@ -39,5 +40,5 @@ profiles:
|
||||
keep-daily: 14
|
||||
keep-weekly: 8
|
||||
tag:
|
||||
- study_data
|
||||
- "{{ os_project }}-{{ win_project }}"
|
||||
prune: true
|
||||
@@ -11,3 +11,4 @@ powershell_path: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
|
||||
import_script: scheduled_transfer_import.ps1
|
||||
export_script: scheduled_transfer_export.ps1
|
||||
scheduled_task_path: \Transfer
|
||||
backup_server_ip: 10.24.2.42
|
||||
@@ -10,6 +10,9 @@ app_quantity: %APP_QUANTITY%
|
||||
gpu_quantity: %GPU_QUANTITY%
|
||||
project_zone: %PROJECT_ZONE%
|
||||
vm_initial_password: %VM_INITIAL_PASSWORD%
|
||||
restic_password: %RESTIC_PASSWORD%
|
||||
restic_rest_user: %RESTIC_REST_USER%
|
||||
restic_rest_password: %RESTIC_REST_PASSWORD%
|
||||
########## Do Not Edit ##########
|
||||
|
||||
vm_image: 3f193ea7-321d-418b-a233-da64661b08b1
|
||||
|
||||
Reference in new issue
Block a user