2 Commits

20 changed files with 17 additions and 127 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,2 @@
external
modules/win_git*
playbooks/test.yaml

View File

@@ -1,3 +0,0 @@
---
- import_playbook: LinuxCLI.yaml
- import_playbook: UnixGUI.yaml

View File

@@ -1,5 +0,0 @@
---
- hosts: localhost
roles:
- role: gdb
- role: system-info

View File

@@ -8,25 +8,26 @@
- role: zsh
- role: neovim
- role: tmux
- role: system-info
when: '"WSL" not in ansible_kernel'
- role: ag
- role: bash
- role: bat
- role: curl
- role: editline
- role: fzf
- role: gh
- role: git
- role: glab
- role: htop
- role: jp
- role: jq
- role: readline
- role: tidy
- role: tree
- role: watch
- role: wget
- role: yq
- role: watch
- role: llvm
- role: nodejs
- role: wsl
when: '"WSL" in ansible_kernel'

View File

@@ -1,7 +1,5 @@
---
- import_playbook: UnixCLI.yaml
- hosts: localhost
roles:
- role: 1password
- role: fonts
- role: obsidian
- role: webcatalog

View File

@@ -1,6 +1,3 @@
---
- import_playbook: UnixCLI.yaml
- hosts: localhost
roles:
- role: gdb
- role: wsl
- import_playbook: Unix.yaml
- import_playbook: Windows.yaml

View File

@@ -1,14 +1,13 @@
---
- import_playbook: UnixCLI.yaml
- hosts: localhost
roles:
- role: system-info
- import_playbook: UnixGUI.yaml
- hosts: localhost
roles:
- role: fonts
- role: mas
- role: iterm
- role: magnet
- role: microsoft-remote-desktop
- role: obsidian
- role: viscosity
- role: webcatalog

View File

@@ -1,3 +1,2 @@
---
- include_tasks: '{{ansible_os_family}}.yaml'
# TODO: If gnome-shell on wayland set global key binding in custom keyboard settings

View File

@@ -1,6 +0,0 @@
---
- name: install dnf package
become: true
dnf:
name: gdb
state: latest

View File

@@ -1,6 +0,0 @@
---
- name: install dnf package
become: true
dnf:
name: glab
state: latest

View File

@@ -1,5 +0,0 @@
---
- name: install desktop menu
command: >
xdg-desktop-menu install --mode user
{{ansible_env.HOME}}/.local/share/applications/obsidian-obsidian.desktop

View File

@@ -4,4 +4,8 @@
name: obsidian
state: latest
- include_tasks: Unix.yaml
- name: clone notes repository
git:
repo: git@github.com:kbenzie/notes.git
dest: '{{ansible_env.HOME}}/Documents/Notes'
version: main

View File

@@ -1,48 +0,0 @@
---
- name: stat symlink
stat:
path: '{{ansible_env.HOME}}/.local/bin/Obsidian'
register: symlink_file
- name: get latest release
uri:
url: https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest
register: latest
- set_fact:
appimage: 'Obsidian-{{latest.json.name}}.AppImage'
- set_fact:
filepath: '{{ansible_env.HOME}}/.local/bin/{{appimage}}'
asset_query: '[?contains(name, `{{appimage}}`)] | [0]'
- set_fact:
needs_installed:
'{{not symlink_file.stat.exists or symlink_file.stat.lnk_source != filepath}}'
asset: '{{latest.json.assets | to_json | from_json | json_query(asset_query)}}'
- name: download latest version
get_url:
url: '{{asset.browser_download_url}}'
dest: '{{filepath}}'
mode: '0755'
- name: create symlink
file:
src: '{{filepath}}'
dest: '{{ansible_env.HOME}}/.local/bin/Obsidian'
state: link
# TODO: icon for desktop file
- name: create desktop file
template:
src: obsidian.desktop.j2
dest: '{{ansible_env.HOME}}/.local/share/applications/obsidian-obsidian.desktop'
notify: install desktop menu
- name: remove old appimage
when: needs_installed and symlink_file.stat.exists
file:
path: '{{symlink_file.stat.lnk_source}}'
state: absent
- include_tasks: Unix.yaml

View File

@@ -1,6 +0,0 @@
---
- name: clone notes repository
git:
repo: git@github.com:kbenzie/notes.git
dest: '{{ansible_env.HOME}}/Documents/Notes'
version: main

View File

@@ -1,11 +0,0 @@
[Desktop Entry]
Name=Obsidian
Exec={{ansible_env.HOME}}/.local/bin/Obsidian
Terminal=false
Type=Application
Icon=obsidian
StartupWMClass=Obsidian
X-AppImage-Version={{latest.json.name}}
Comment=Private and flexible notetaking app that adapts to the way you think.
MimeType=x-scheme-handler/obsidian;
Categories=Utility;

View File

@@ -1,4 +0,0 @@
---
# TODO: Install ulauncher - or find a better alternative
# TODO: If gnome-shell on wayland set global key binding in custom keyboard settings
# TODO: Clone https://github.com/shepda/ulauncher-adwaita-darkish into ~/.config/ulauncher/user-themes

View File

@@ -1,5 +0,0 @@
---
- name: install desktop menu
command: >
xdg-desktop-menu install --mode user
{{ansible_env.HOME}}/.local/share/applications/webcatalog-webcatalog.desktop

View File

@@ -40,7 +40,6 @@
template:
src: webcatalog.desktop.j2
dest: '{{ansible_env.HOME}}/.local/share/applications/webcatalog-webcatalog.desktop'
notify: install desktop menu
- name: remove old appimage
when: needs_installed and symlink_file.stat.exists

View File

@@ -1,6 +1,5 @@
---
- name: install apt package
become: true
apt:
name: wget
state: latest

View File

@@ -1,6 +0,0 @@
---
- name: install dnf package
become: true
dnf:
name: wget
state: latest