Compare commits
1 Commits
f7ee7af25c
...
moonlight
| Author | SHA1 | Date | |
|---|---|---|---|
| 98573c0066 |
@@ -1,5 +1,6 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
|
||||
roles:
|
||||
- role: sudo
|
||||
when: ansible_user_id != "root"
|
||||
@@ -14,7 +15,6 @@
|
||||
- role: bat
|
||||
- role: curl
|
||||
- role: fzf
|
||||
- role: gh
|
||||
- role: git
|
||||
- role: htop
|
||||
- role: jp
|
||||
@@ -23,11 +23,12 @@
|
||||
- role: tidy
|
||||
- role: tree
|
||||
- role: yq
|
||||
- role: watch
|
||||
|
||||
- role: llvm
|
||||
- role: nodejs
|
||||
- role: python
|
||||
|
||||
- role: 1password
|
||||
|
||||
- role: wsl
|
||||
when: '"WSL" in ansible_kernel'
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
- import_playbook: UnixCLI.yaml
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: 1password
|
||||
@@ -14,9 +14,8 @@
|
||||
- role: bat
|
||||
- role: curl
|
||||
- role: fzf
|
||||
- role: gh
|
||||
- role: jq
|
||||
- role: tree
|
||||
- role: jq
|
||||
- role: yq
|
||||
|
||||
- role: llvm
|
||||
|
||||
14
macOS.yaml
14
macOS.yaml
@@ -1,13 +1,7 @@
|
||||
---
|
||||
- import_playbook: UnixGUI.yaml
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: fonts
|
||||
- role: mas
|
||||
- import_playbook: Unix.yaml
|
||||
|
||||
- role: iterm
|
||||
- role: magnet
|
||||
- role: microsoft-remote-desktop
|
||||
- hosts: localhost
|
||||
|
||||
roles:
|
||||
- role: obsidian
|
||||
- role: viscosity
|
||||
- role: webcatalog
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
- name: create .editrc config file
|
||||
template:
|
||||
src: editrc
|
||||
dest: '{{ansible_env.HOME}}/.editrc'
|
||||
@@ -1,3 +0,0 @@
|
||||
# Enable vi mode
|
||||
lldb:bind -v
|
||||
lldb:bind ^I lldb_complete
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
- name: enable homebrew tap
|
||||
homebrew_tap:
|
||||
name: homebrew/cask-fonts
|
||||
|
||||
- name: install Caskaydia Cove Nerd Font
|
||||
homebrew_cask:
|
||||
name: font-caskaydia-cove-nerd-font
|
||||
state: latest
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
- name: install homebrew package
|
||||
homebrew:
|
||||
name: gh
|
||||
state: latest
|
||||
@@ -1,39 +0,0 @@
|
||||
---
|
||||
- set_fact:
|
||||
arch_map:
|
||||
aarch64: arm64
|
||||
armv6l: armhf
|
||||
armv7l: armhf
|
||||
i386: i386
|
||||
x86_64: amd64
|
||||
- set_fact:
|
||||
arch: '{{ [ansible_architecture] | map("extract", arch_map) | first }}'
|
||||
|
||||
- name: download apt repository key
|
||||
become: true
|
||||
get_url:
|
||||
url: https://cli.github.com/packages/githubcli-archive-keyring.gpg
|
||||
dest: /usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||
mode: 0644
|
||||
|
||||
- name: add apt repository list
|
||||
become: true
|
||||
apt_repository:
|
||||
filename: github-cli
|
||||
repo: 'deb [arch={{arch}} signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main'
|
||||
state: present
|
||||
|
||||
- name: install apt package
|
||||
become: true
|
||||
apt:
|
||||
name: gh
|
||||
state: latest
|
||||
update_cache: true
|
||||
register: gh_apt
|
||||
|
||||
- debug: msg={{gh_apt}}
|
||||
|
||||
- name: install zsh completions
|
||||
when: gh_apt.changed
|
||||
become: true
|
||||
shell: gh completion -s zsh > /usr/local/share/zsh/site-functions/_gh
|
||||
@@ -1,2 +0,0 @@
|
||||
---
|
||||
- include_tasks: '{{ansible_os_family}}.yaml'
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
- assert:
|
||||
that: ansible_os_family == "Darwin"
|
||||
|
||||
- name: install homebrew package
|
||||
homebrew_cask:
|
||||
name: iterm2
|
||||
state: latest
|
||||
|
||||
# TODO: Configure stuff, somehow?
|
||||
@@ -4,12 +4,9 @@
|
||||
url: https://api.github.com/repos/jmespath/jp/releases/latest
|
||||
register: latest
|
||||
|
||||
# TODO: Support arm64
|
||||
- set_fact:
|
||||
arch: '{{ [ansible_architecture] |
|
||||
map("extract", { "arm64": "arm64", "x86_64": "amd64" }) | first }}'
|
||||
|
||||
- set_fact:
|
||||
asset_query: '[?contains(name, `jp-darwin-{{arch}}`)] | [0]'
|
||||
asset_query: '[?contains(name, `jp-darwin-amd64`)] | [0]'
|
||||
assets: '{{latest.json.assets}}'
|
||||
latest_version: '{{latest.json.tag_name}}'
|
||||
jp_exe: '{{ansible_env.HOME}}/.local/bin/jp'
|
||||
@@ -17,7 +14,7 @@
|
||||
- name: check if already installed
|
||||
stat:
|
||||
path: '{{jp_exe}}'
|
||||
register: jp_stat
|
||||
register: jp_exe
|
||||
|
||||
- name: get installed version
|
||||
when: jp_stat.stat.exists == True
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- assert:
|
||||
that: ansible_os_family == 'Darwin'
|
||||
|
||||
- name: install app store package
|
||||
mas:
|
||||
id: 441258766
|
||||
state: latest
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- assert:
|
||||
that: ansible_os_family == 'Darwin'
|
||||
|
||||
- name: install homebrew package
|
||||
homebrew:
|
||||
name: mas
|
||||
state: latest
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- assert:
|
||||
that: ansible_os_family == "Darwin"
|
||||
|
||||
- name: install homebrew cask
|
||||
homebrew_cask:
|
||||
name: microsoft-remote-desktop
|
||||
state: latest
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: install chocolatey package
|
||||
win_chocolatey:
|
||||
name: gh
|
||||
name: moonlight-qt
|
||||
state: latest
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: install homebrew package
|
||||
homebrew_cask:
|
||||
homebrew:
|
||||
name: obsidian
|
||||
state: latest
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
git:
|
||||
repo: git@github.com:kbenzie/notes.git
|
||||
dest: '{{ansible_env.HOME}}/Documents/Notes'
|
||||
version: main
|
||||
branch: main
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
- assert:
|
||||
that: ansible_user_id != "root"
|
||||
|
||||
- include_vars: '{{ansible_os_family}}.yaml'
|
||||
|
||||
- name: create /etc/sudoers.d/{user} config file
|
||||
become: true
|
||||
template:
|
||||
src: sudoers
|
||||
dest: '/etc/sudoers.d/{{ansible_user_id}}'
|
||||
owner: '{{sudo_owner}}'
|
||||
group: '{{sudo_group}}'
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0440'
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
sudo_owner: root
|
||||
sudo_group: wheel
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
sudo_owner: root
|
||||
sudo_group: root
|
||||
@@ -3,21 +3,6 @@
|
||||
pacman:
|
||||
name:
|
||||
- tmux
|
||||
- xclip
|
||||
- urlscan
|
||||
state: latest
|
||||
|
||||
- name: install pacman package
|
||||
when: '"WSL" not in ansible_kernel'
|
||||
become: true
|
||||
pacman:
|
||||
name: xsel
|
||||
state: latest
|
||||
|
||||
- name: remove pacman package
|
||||
when: '"WSL" in ansible_kernel'
|
||||
become: true
|
||||
pacman:
|
||||
name:
|
||||
- xclip
|
||||
- xsel
|
||||
state: absent
|
||||
|
||||
@@ -7,31 +7,3 @@
|
||||
- reattach-to-user-namespace
|
||||
- urlview
|
||||
state: latest
|
||||
|
||||
- name: check terminal info description exists
|
||||
command: /usr/bin/infocmp -x tmux-256color
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
register: terminfo_exists
|
||||
|
||||
- name: download latest terminfo description
|
||||
when: terminfo_exists.rc == 1
|
||||
get_url:
|
||||
url: https://gist.githubusercontent.com/nicm/ea9cf3c93f22e0246ec858122d9abea1/raw/37ae29fc86e88b48dbc8a674478ad3e7a009f357/tmux-256color
|
||||
dest: ~/tmux-256color
|
||||
|
||||
- name: compile terminal info
|
||||
when: terminfo_exists.rc == 1
|
||||
command: /usr/bin/tic -x ~/tmux-256color
|
||||
|
||||
- name: cleanup downloaded terminfo description
|
||||
when: terminfo_exists.rc == 1
|
||||
file:
|
||||
path: ~/tmux-256color
|
||||
state: absent
|
||||
|
||||
- name: check terminal info description exists
|
||||
when: terminfo_exists.rc == 1
|
||||
command: /usr/bin/infocmp -x tmux-256color
|
||||
changed_when: false
|
||||
register: terminfo_exists
|
||||
|
||||
@@ -1,26 +1,12 @@
|
||||
---
|
||||
- name: install apt packages
|
||||
become: true
|
||||
apt:
|
||||
package:
|
||||
name:
|
||||
- tmux
|
||||
- gawk
|
||||
- jq
|
||||
- sysstat
|
||||
- urlview
|
||||
state: latest
|
||||
|
||||
- name: install apt package
|
||||
when: '"WSL" not in ansible_kernel'
|
||||
become: true
|
||||
apt:
|
||||
name: xsel
|
||||
state: latest
|
||||
|
||||
- name: remove apt package
|
||||
when: '"WSL" in ansible_kernel'
|
||||
become: true
|
||||
apt:
|
||||
name:
|
||||
- xclip
|
||||
- xsel
|
||||
state: absent
|
||||
state: latest
|
||||
|
||||
@@ -3,22 +3,8 @@
|
||||
dnf:
|
||||
name:
|
||||
- tmux
|
||||
- xclip
|
||||
- urlscan
|
||||
- sysstat
|
||||
- jq
|
||||
state: latest
|
||||
|
||||
- name: install dnf package
|
||||
when: '"WSL" not in ansible_kernel'
|
||||
become: true
|
||||
dnf:
|
||||
name: xsel
|
||||
state: latest
|
||||
|
||||
- name: remove dnf package
|
||||
when: '"WSL" in ansible_kernel'
|
||||
become: true
|
||||
dnf:
|
||||
name:
|
||||
- xclip
|
||||
- xsel
|
||||
state: absent
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- assert:
|
||||
that: ansible_os_family == "Darwin"
|
||||
|
||||
- name: install homebrew package
|
||||
homebrew_cask:
|
||||
name: viscosity
|
||||
state: latest
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
- name: install homebrew package
|
||||
when: ansible_os_family == "Darwin"
|
||||
homebrew:
|
||||
name: watch
|
||||
state: latest
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- assert:
|
||||
that: ansible_os_family == "Darwin"
|
||||
|
||||
- name: install homebrew package
|
||||
homebrew_cask:
|
||||
name: webcatalog
|
||||
state: latest
|
||||
Reference in New Issue
Block a user