diff --git a/roles/autohotkey/tasks/main.yaml b/roles/autohotkey/tasks/main.yaml index 16f38fc..8f64b6d 100644 --- a/roles/autohotkey/tasks/main.yaml +++ b/roles/autohotkey/tasks/main.yaml @@ -7,8 +7,27 @@ - name: clone config repo win_git: repo: git@code.infektor.net:config/AutoHotKey.git - dest: '{{ansible_env.LOCALAPPDATA}}/AutoHotKey' + dest: '{{autohotkey_repo_dir}}' branch: master -# TODO: - name: create scheduled task -# win_scheduled_task: +- name: create scheduled task + win_scheduled_task: + path: Benie + name: macOS.ahk + state: present + enable: true + triggers: + - type: logon + enabled: true + - type: registration + enabled: true + actions: + - path: '{{autohotkey_repo_dir}}/macOS.ahk' + disallow_start_if_on_batteries: false + stop_if_going_on_batteries: false + execution_time_limit: PT0S + logon_type: interactive_token + multiple_instances: 3 + run_level: highest + start_when_available: true + wake_to_run: false diff --git a/roles/autohotkey/vars/main.yaml b/roles/autohotkey/vars/main.yaml new file mode 100644 index 0000000..456fbd8 --- /dev/null +++ b/roles/autohotkey/vars/main.yaml @@ -0,0 +1,2 @@ +--- +autohotkey_repo_dir: '{{ansible_env.LOCALAPPDATA}}/AutoHotKey'