mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 17:47:21 +00:00
Use variables for creating scheduled tasks
This commit is contained in:
1 parent
bfb97cbf5d
commit
089ac5fac3
2 files changed
+10
-8
No files matched your search
@@ -5,7 +5,7 @@
|
|||||||
- name: Copy transfer scripts to fileserver
|
- name: Copy transfer scripts to fileserver
|
||||||
win_copy:
|
win_copy:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
dest: c:\eidf\
|
dest: "{{ script_folder }}"
|
||||||
force: true
|
force: true
|
||||||
loop:
|
loop:
|
||||||
- "{{ import_script }}"
|
- "{{ import_script }}"
|
||||||
@@ -22,10 +22,10 @@
|
|||||||
username: "{{ win_project }}\\{{ filetransfer_user }}"
|
username: "{{ win_project }}\\{{ filetransfer_user }}"
|
||||||
password: "{{ transfer_user_password }}"
|
password: "{{ transfer_user_password }}"
|
||||||
logon_type: password
|
logon_type: password
|
||||||
path: \Transfer
|
path: "{{ scheduled_task_path }}"
|
||||||
actions:
|
actions:
|
||||||
- path: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
|
- path: "{{ powershell_path }}"
|
||||||
arguments: C:\eidf\scheduled_transfer_Export_v1.3.ps1
|
arguments: "{{ script_folder }}\\{{ export_script }}"
|
||||||
triggers:
|
triggers:
|
||||||
- type: registration
|
- type: registration
|
||||||
repetition:
|
repetition:
|
||||||
@@ -38,10 +38,10 @@
|
|||||||
username: "{{ win_project }}\\{{ filetransfer_user }}"
|
username: "{{ win_project }}\\{{ filetransfer_user }}"
|
||||||
password: "{{ transfer_user_password }}"
|
password: "{{ transfer_user_password }}"
|
||||||
logon_type: password
|
logon_type: password
|
||||||
path: \Transfer
|
path: "{{ scheduled_task_path }}"
|
||||||
actions:
|
actions:
|
||||||
- path: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
|
- path: "{{ powershell_path }}"
|
||||||
arguments: C:\eidf\scheduled_transfer_Import_v1.3.ps1
|
arguments: "{{ script_folder }}\\{{ import_script }}"
|
||||||
triggers:
|
triggers:
|
||||||
- type: registration
|
- type: registration
|
||||||
repetition:
|
repetition:
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ studydata_volume_label: Study_Data_DFS
|
|||||||
filetransfer_drive_letter: T
|
filetransfer_drive_letter: T
|
||||||
filetransfer_volume_label: File_Transfer
|
filetransfer_volume_label: File_Transfer
|
||||||
|
|
||||||
|
script_folder: C:\eidf
|
||||||
powershell_path: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
|
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
|
||||||
Reference in new issue
Block a user