Compare commits

...

3 Commits

4 changed files with 9 additions and 9 deletions

View File

@ -1,6 +1,5 @@
--- ---
- import_playbook: UnixCLI.yaml - import_playbook: UnixCLI.yaml
- hosts: localhost - hosts: localhost
roles: roles:
- role: 1password - role: 1password

View File

@ -1,7 +1,5 @@
--- ---
- import_playbook: Unix.yaml - import_playbook: UnixGUI.yaml
- hosts: localhost - hosts: localhost
roles: roles:
- role: obsidian - role: obsidian

View File

@ -4,9 +4,12 @@
url: https://api.github.com/repos/jmespath/jp/releases/latest url: https://api.github.com/repos/jmespath/jp/releases/latest
register: latest register: latest
# TODO: Support arm64
- set_fact: - set_fact:
asset_query: '[?contains(name, `jp-darwin-amd64`)] | [0]' arch: '{{ [ansible_architecture] |
map("extract", { "arm64": "arm64", "x86_64": "amd64" }) | first }}'
- set_fact:
asset_query: '[?contains(name, `jp-darwin-{{arch}}`)] | [0]'
assets: '{{latest.json.assets}}' assets: '{{latest.json.assets}}'
latest_version: '{{latest.json.tag_name}}' latest_version: '{{latest.json.tag_name}}'
jp_exe: '{{ansible_env.HOME}}/.local/bin/jp' jp_exe: '{{ansible_env.HOME}}/.local/bin/jp'
@ -14,7 +17,7 @@
- name: check if already installed - name: check if already installed
stat: stat:
path: '{{jp_exe}}' path: '{{jp_exe}}'
register: jp_exe register: jp_stat
- name: get installed version - name: get installed version
when: jp_stat.stat.exists == True when: jp_stat.stat.exists == True

View File

@ -1,6 +1,6 @@
--- ---
- name: install homebrew package - name: install homebrew package
homebrew: homebrew_cask:
name: obsidian name: obsidian
state: latest state: latest
@ -8,4 +8,4 @@
git: git:
repo: git@github.com:kbenzie/notes.git repo: git@github.com:kbenzie/notes.git
dest: '{{ansible_env.HOME}}/Documents/Notes' dest: '{{ansible_env.HOME}}/Documents/Notes'
branch: main version: main