mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 11:17: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
|
- name: Install scoop
|
||||||
tags: install_scoop
|
tags: install_scoop
|
||||||
block:
|
block:
|
||||||
#- name: download install script
|
|
||||||
# ansible.windows.win_powershell:
|
|
||||||
# script: |
|
|
||||||
# irm get.scoop.sh -outfile 'C:\eidf\install.ps1'
|
|
||||||
- name: Run install script
|
- name: Run install script
|
||||||
win_shell: |
|
win_shell: |
|
||||||
powershell Invoke-RestMethod -Uri https://get.scoop.sh -outfile 'C:\eidf\install.ps1'
|
powershell Invoke-RestMethod -Uri https://get.scoop.sh -outfile 'C:\eidf\install.ps1'
|
||||||
@@ -34,14 +30,29 @@
|
|||||||
win_shell: scoop install resticprofile
|
win_shell: scoop install resticprofile
|
||||||
tags: 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
|
- name: Copy resticprofile
|
||||||
ansible.windows.win_template:
|
ansible.windows.win_template:
|
||||||
src: "profiles.yaml"
|
src: "profiles.yaml"
|
||||||
dest: "C:\\resticprofile"
|
dest: "C:\\resticprofile\\"
|
||||||
force: true
|
force: true
|
||||||
tags: copy_resticprofile
|
tags: copy_resticprofile
|
||||||
|
|
||||||
- name: Schedule resticprofile
|
- name: Schedule resticprofile
|
||||||
win_shell: resticprofile -n study_data schedule
|
win_shell: resticprofile -n study_data schedule
|
||||||
tags: schedule_resticprofile
|
tags:
|
||||||
|
- schedule_resticprofile
|
||||||
|
- never
|
||||||
when: inventory_hostname in groups['meta-name_fs01']
|
when: inventory_hostname in groups['meta-name_fs01']
|
||||||
@@ -10,13 +10,15 @@ profiles:
|
|||||||
default:
|
default:
|
||||||
repository: local:C:\eidf\restic-repo
|
repository: local:C:\eidf\restic-repo
|
||||||
password-file: C:\resticprofile\restic.key
|
password-file: C:\resticprofile\restic.key
|
||||||
|
insecure-tls: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RESTIC_PATH:
|
RESTIC_PATH:
|
||||||
|
|
||||||
study_data:
|
study_data:
|
||||||
inherit: default
|
inherit: default
|
||||||
repository: local:C:\eidf\restic-repo
|
repository: rest:https://{{ restic_user }}:{{ restic_rest_password }}@{{ backup_server_ip }}:8000
|
||||||
|
initialize: true
|
||||||
|
|
||||||
backup:
|
backup:
|
||||||
source: S:\
|
source: S:\
|
||||||
@@ -30,7 +32,6 @@ profiles:
|
|||||||
- S:\System Volume Information
|
- S:\System Volume Information
|
||||||
- S:\DfsrPrivate
|
- S:\DfsrPrivate
|
||||||
tag:
|
tag:
|
||||||
- study_data
|
|
||||||
- "{{ os_project }}-{{ win_project }}"
|
- "{{ os_project }}-{{ win_project }}"
|
||||||
|
|
||||||
retention:
|
retention:
|
||||||
@@ -39,5 +40,5 @@ profiles:
|
|||||||
keep-daily: 14
|
keep-daily: 14
|
||||||
keep-weekly: 8
|
keep-weekly: 8
|
||||||
tag:
|
tag:
|
||||||
- study_data
|
- "{{ os_project }}-{{ win_project }}"
|
||||||
prune: true
|
prune: true
|
||||||
@@ -11,3 +11,4 @@ powershell_path: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
|
|||||||
import_script: scheduled_transfer_import.ps1
|
import_script: scheduled_transfer_import.ps1
|
||||||
export_script: scheduled_transfer_export.ps1
|
export_script: scheduled_transfer_export.ps1
|
||||||
scheduled_task_path: \Transfer
|
scheduled_task_path: \Transfer
|
||||||
|
backup_server_ip: 10.24.2.42
|
||||||
@@ -10,6 +10,9 @@ app_quantity: %APP_QUANTITY%
|
|||||||
gpu_quantity: %GPU_QUANTITY%
|
gpu_quantity: %GPU_QUANTITY%
|
||||||
project_zone: %PROJECT_ZONE%
|
project_zone: %PROJECT_ZONE%
|
||||||
vm_initial_password: %VM_INITIAL_PASSWORD%
|
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 ##########
|
########## Do Not Edit ##########
|
||||||
|
|
||||||
vm_image: 3f193ea7-321d-418b-a233-da64661b08b1
|
vm_image: 3f193ea7-321d-418b-a233-da64661b08b1
|
||||||
|
|||||||
Reference in new issue
Block a user