mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 14: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
|
||||
win_copy:
|
||||
src: "{{ item }}"
|
||||
dest: c:\eidf\
|
||||
dest: "{{ script_folder }}"
|
||||
force: true
|
||||
loop:
|
||||
- "{{ import_script }}"
|
||||
@@ -22,10 +22,10 @@
|
||||
username: "{{ win_project }}\\{{ filetransfer_user }}"
|
||||
password: "{{ transfer_user_password }}"
|
||||
logon_type: password
|
||||
path: \Transfer
|
||||
path: "{{ scheduled_task_path }}"
|
||||
actions:
|
||||
- path: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
|
||||
arguments: C:\eidf\scheduled_transfer_Export_v1.3.ps1
|
||||
- path: "{{ powershell_path }}"
|
||||
arguments: "{{ script_folder }}\\{{ export_script }}"
|
||||
triggers:
|
||||
- type: registration
|
||||
repetition:
|
||||
@@ -38,10 +38,10 @@
|
||||
username: "{{ win_project }}\\{{ filetransfer_user }}"
|
||||
password: "{{ transfer_user_password }}"
|
||||
logon_type: password
|
||||
path: \Transfer
|
||||
path: "{{ scheduled_task_path }}"
|
||||
actions:
|
||||
- path: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
|
||||
arguments: C:\eidf\scheduled_transfer_Import_v1.3.ps1
|
||||
- path: "{{ powershell_path }}"
|
||||
arguments: "{{ script_folder }}\\{{ import_script }}"
|
||||
triggers:
|
||||
- type: registration
|
||||
repetition:
|
||||
|
||||
@@ -3,6 +3,8 @@ studydata_volume_label: Study_Data_DFS
|
||||
filetransfer_drive_letter: T
|
||||
filetransfer_volume_label: File_Transfer
|
||||
|
||||
script_folder: C:\eidf
|
||||
powershell_path: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
|
||||
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