Compare commits
2 Commits
47d9c4c7e7
...
3b312e6f9a
Author | SHA1 | Date | |
---|---|---|---|
3b312e6f9a | |||
e625f463d7 |
@ -25,6 +25,7 @@
|
|||||||
- role: autohotkey
|
- role: autohotkey
|
||||||
- role: ferdium
|
- role: ferdium
|
||||||
- role: firefox
|
- role: firefox
|
||||||
|
- role: fonts
|
||||||
- role: obsidian
|
- role: obsidian
|
||||||
- role: powertoys
|
- role: powertoys
|
||||||
- role: windows-terminal
|
- role: windows-terminal
|
||||||
|
@ -11,36 +11,21 @@
|
|||||||
path: '{{app_exe}}'
|
path: '{{app_exe}}'
|
||||||
register: app_stat
|
register: app_stat
|
||||||
|
|
||||||
- name: get installed version
|
|
||||||
when: app_stat.stat.exists == True
|
|
||||||
win_command: '{{app_exe}} --version'
|
|
||||||
register: app_version
|
|
||||||
changed_when: false
|
|
||||||
|
|
||||||
- when: app_stat.stat.exists == True
|
|
||||||
set_fact:
|
|
||||||
installed_version: '{{app_version.stdout.strip()}}'
|
|
||||||
|
|
||||||
- name: download latest installer
|
- name: download latest installer
|
||||||
|
when: not app_stat.stat.exists
|
||||||
win_get_url:
|
win_get_url:
|
||||||
url: https://downloads.1password.com/win/1PasswordSetup-latest.exe
|
url: https://downloads.1password.com/win/1PasswordSetup-latest.exe
|
||||||
dest: '{{installer_exe}}'
|
dest: '{{installer_exe}}'
|
||||||
|
|
||||||
- name: get installer version
|
|
||||||
win_shell: |
|
|
||||||
(Get-ItemProperty {{installer_exe}}).VersionInfo.ProductVersion
|
|
||||||
register: installer_product_version
|
|
||||||
changed_when: false
|
|
||||||
|
|
||||||
# FIXME: The [5:] is to account for a mystery "\e[6 q" prefix, not sure if this
|
|
||||||
# is consistent across machines or some other oddity.
|
|
||||||
- set_fact:
|
|
||||||
installer_version: '{{installer_product_version.stdout.strip()[5:]}}'
|
|
||||||
|
|
||||||
- name: run installer
|
- name: run installer
|
||||||
when: installed_version is not defined or installed_version != installer_version
|
when: not app_stat.stat.exists
|
||||||
win_command: '{{installer_exe}}'
|
win_command: '{{installer_exe}}'
|
||||||
|
|
||||||
|
- name: remove installer
|
||||||
|
win_file:
|
||||||
|
path: '{{installer_exe}}'
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: create start menu shortcut
|
- name: create start menu shortcut
|
||||||
win_shortcut:
|
win_shortcut:
|
||||||
src: '{{app_exe}}'
|
src: '{{app_exe}}'
|
||||||
|
5
roles/fonts/tasks/Windows.yaml
Normal file
5
roles/fonts/tasks/Windows.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- name: install chocolatey package
|
||||||
|
win_chocolatey:
|
||||||
|
name: nerd-fonts-CascadiaCode
|
||||||
|
state: latest
|
@ -1,5 +1,7 @@
|
|||||||
---
|
---
|
||||||
- when: ansible_os_family == 'Darwin'
|
- when: ansible_os_family == 'Darwin'
|
||||||
include_tasks: 'Darwin.yaml'
|
include_tasks: 'Darwin.yaml'
|
||||||
|
- when: ansible_os_family == 'Windows'
|
||||||
|
include_tasks: 'Windows.yaml'
|
||||||
- when: ansible_os_family != 'Darwin' and ansible_os_family != 'Windows'
|
- when: ansible_os_family != 'Darwin' and ansible_os_family != 'Windows'
|
||||||
include_tasks: 'Linux.yaml'
|
include_tasks: 'Linux.yaml'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user