Compare commits
37 Commits
moonlight
...
8fae111d0e
| Author | SHA1 | Date | |
|---|---|---|---|
| 8fae111d0e | |||
| 5b62791bf6 | |||
| ad9d1fbe4f | |||
| c4d4f5395a | |||
| 5ac1081f90 | |||
| a80d8e1574 | |||
| dbd8af4648 | |||
| 23f0fd7f23 | |||
| bdbb6a3f3b | |||
| 7148f492b0 | |||
| 03de2224f8 | |||
| d4d37fb6bc | |||
| 1608987eef | |||
| b4d4bd0664 | |||
| 39268ae7aa | |||
| 368982b8fa | |||
| b3cd84e181 | |||
| b0d2fd212e | |||
| f7ee7af25c | |||
| 50a9cc97b6 | |||
| e2d1414c3b | |||
| 576eb2ae41 | |||
| 69bcd75f7b | |||
| d32588dbfd | |||
| 4783803a77 | |||
| 1ad397771d | |||
| 6ff50854e0 | |||
| 5cba48f632 | |||
| 7e9166cb48 | |||
| 747f1a6992 | |||
| db3d146dc9 | |||
| 91839b927d | |||
| c5e2a76d2e | |||
| baa0206937 | |||
| 2abc38f696 | |||
| 63ff47c3b2 | |||
| da4b8858d3 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
external
|
||||
modules/win_git*
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"yaml.schemas": {
|
||||
"https://raw.githubusercontent.com/ansible-community/schemas/main/f/ansible.json#/$defs/playbook": [
|
||||
"./*.yaml"
|
||||
],
|
||||
"https://raw.githubusercontent.com/ansible-community/schemas/main/f/ansible.json#/$defs/tasks": [
|
||||
"./roles/*/handlers/*.yaml",
|
||||
"./roles/*/tasks/*.yaml",
|
||||
"./tasks.yaml"
|
||||
]
|
||||
}
|
||||
}
|
||||
5
ansible.cfg
Normal file
5
ansible.cfg
Normal file
@@ -0,0 +1,5 @@
|
||||
[defaults]
|
||||
collections_path = collections
|
||||
library = modules
|
||||
roles_path = roles
|
||||
stdout_callback = yaml
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
- import_playbook: Unix.yaml
|
||||
|
||||
- hosts: localhost
|
||||
|
||||
roles:
|
||||
- role: obsidian
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
|
||||
roles:
|
||||
- role: sudo
|
||||
when: ansible_user_id != "root"
|
||||
- role: python
|
||||
|
||||
- role: zsh
|
||||
- role: neovim
|
||||
@@ -15,6 +15,7 @@
|
||||
- role: bat
|
||||
- role: curl
|
||||
- role: fzf
|
||||
- role: gh
|
||||
- role: git
|
||||
- role: htop
|
||||
- role: jp
|
||||
@@ -23,12 +24,10 @@
|
||||
- role: tidy
|
||||
- role: tree
|
||||
- role: yq
|
||||
- role: watch
|
||||
|
||||
- role: llvm
|
||||
- role: nodejs
|
||||
- role: python
|
||||
|
||||
- role: 1password
|
||||
|
||||
- role: wsl
|
||||
when: '"WSL" in ansible_kernel'
|
||||
5
playbooks/UnixGUI.yaml
Normal file
5
playbooks/UnixGUI.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- import_playbook: UnixCLI.yaml
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: 1password
|
||||
@@ -5,6 +5,7 @@
|
||||
install_cad_apps: false
|
||||
|
||||
roles:
|
||||
- role: python
|
||||
- role: git
|
||||
- role: powershell
|
||||
- role: neovim
|
||||
@@ -14,13 +15,13 @@
|
||||
- role: bat
|
||||
- role: curl
|
||||
- role: fzf
|
||||
- role: tree
|
||||
- role: gh
|
||||
- role: jq
|
||||
- role: tree
|
||||
- role: yq
|
||||
|
||||
- role: llvm
|
||||
- role: nodejs
|
||||
- role: python
|
||||
|
||||
- role: 1password
|
||||
- role: autohotkey
|
||||
13
playbooks/macOS.yaml
Normal file
13
playbooks/macOS.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
- 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
|
||||
@@ -1,10 +1,13 @@
|
||||
---
|
||||
- set_fact:
|
||||
keyring: /etc/apt/trusted.gpg.d/1password-archive-keyring.gpg
|
||||
|
||||
- name: add apt signing key
|
||||
when: '"WSL" not in ansible_kernel'
|
||||
become: true
|
||||
apt_key:
|
||||
url: https://downloads.1password.com/linux/keys/1password.asc
|
||||
keyring: /etc/apt/trusted.gpg.d/1password-archive-keyring.gpg
|
||||
keyring: '{{keyring}}'
|
||||
state: present
|
||||
|
||||
- when: ansible_machine == 'x86_64'
|
||||
@@ -20,9 +23,9 @@
|
||||
become: true
|
||||
apt_repository:
|
||||
repo: >-
|
||||
deb [arch={{arch}}
|
||||
signed-by=/etc/apt/trusted.gpg.d/1password-archive-keyring.gpg]
|
||||
deb [arch={{arch}} signed-by={{keyring}}]
|
||||
https://downloads.1password.com/linux/debian/{{arch}} stable main
|
||||
filename: 1password
|
||||
|
||||
- name: install gui package
|
||||
when: '"WSL" not in ansible_kernel'
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
register: zsh_completion_script
|
||||
changed_when: false
|
||||
|
||||
- name: create local zsh site functions directory
|
||||
file:
|
||||
state: directory
|
||||
path: ~/.local/share/zsh/site-functions
|
||||
|
||||
- name: create op zsh completion file
|
||||
copy:
|
||||
content: '{{zsh_completion_script.stdout}}'
|
||||
|
||||
5
roles/editline/tasks/main.yaml
Normal file
5
roles/editline/tasks/main.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: create .editrc config file
|
||||
template:
|
||||
src: editrc
|
||||
dest: '{{ansible_env.HOME}}/.editrc'
|
||||
3
roles/editline/templates/editrc
Normal file
3
roles/editline/templates/editrc
Normal file
@@ -0,0 +1,3 @@
|
||||
# Enable vi mode
|
||||
lldb:bind -v
|
||||
lldb:bind ^I lldb_complete
|
||||
9
roles/fonts/tasks/Darwin.yaml
Normal file
9
roles/fonts/tasks/Darwin.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
- 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
|
||||
2
roles/fonts/tasks/main.yaml
Normal file
2
roles/fonts/tasks/main.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
- include_tasks: '{{ansible_os_family}}.yaml'
|
||||
6
roles/fzf/tasks/Debian-apt.yaml
Normal file
6
roles/fzf/tasks/Debian-apt.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: install apt package
|
||||
become: true
|
||||
apt:
|
||||
name: fzf
|
||||
state: latest
|
||||
@@ -1,6 +1,8 @@
|
||||
---
|
||||
- name: install apt package
|
||||
become: true
|
||||
apt:
|
||||
name: fzf
|
||||
state: latest
|
||||
- when: ansible_distribution == 'Ubuntu' and
|
||||
ansible_distribution_version is version('22.04', '<=')
|
||||
include_tasks: Debian-old.yaml
|
||||
|
||||
- when: not (ansible_distribution == 'Ubuntu' and
|
||||
ansible_distribution_version is version('22.04', '<='))
|
||||
include_tasks: Debian-apt.yaml
|
||||
|
||||
5
roles/gh/tasks/Darwin.yaml
Normal file
5
roles/gh/tasks/Darwin.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: install homebrew package
|
||||
homebrew:
|
||||
name: gh
|
||||
state: latest
|
||||
37
roles/gh/tasks/Debian.yaml
Normal file
37
roles/gh/tasks/Debian.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
- 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
|
||||
|
||||
- name: install zsh completions
|
||||
when: gh_apt.changed
|
||||
become: true
|
||||
shell: gh completion -s zsh > /usr/local/share/zsh/site-functions/_gh
|
||||
5
roles/gh/tasks/Windows.yaml
Normal file
5
roles/gh/tasks/Windows.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: install chocolatey package
|
||||
win_chocolatey:
|
||||
name: gh
|
||||
state: latest
|
||||
2
roles/gh/tasks/main.yaml
Normal file
2
roles/gh/tasks/main.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
- include_tasks: '{{ansible_os_family}}.yaml'
|
||||
@@ -18,8 +18,4 @@
|
||||
extra_args: --user
|
||||
state: latest
|
||||
|
||||
- name: create symbolic links
|
||||
file:
|
||||
state: link
|
||||
src: ~/.config/git/_git-changes
|
||||
dest: ~/.local/share/zsh/site-functions/_git-changes
|
||||
- include_tasks: ~/.config/git/tasks.yaml
|
||||
|
||||
5
roles/glab/tasks/Darwin.yaml
Normal file
5
roles/glab/tasks/Darwin.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: install homebrew package
|
||||
homebrew:
|
||||
name: glab
|
||||
state: latest
|
||||
67
roles/glab/tasks/Debian.yaml
Normal file
67
roles/glab/tasks/Debian.yaml
Normal file
@@ -0,0 +1,67 @@
|
||||
---
|
||||
- set_fact:
|
||||
glab: /usr/bin/glab
|
||||
- name: stat the executable
|
||||
stat:
|
||||
path: '{{glab}}'
|
||||
register: stat_glab
|
||||
|
||||
- name: get instlal version
|
||||
when: stat_glab.stat.exists
|
||||
command: '{{glab}} --version'
|
||||
register: glab_version_output
|
||||
changed_when: false
|
||||
|
||||
- when: stat_glab.stat.exists
|
||||
set_fact:
|
||||
glab_version: '{{glab_version_output.stdout | replace("glab version ", "v")}}'
|
||||
|
||||
- set_fact:
|
||||
gitlab_api: 'https://gitlab.com/api/v4'
|
||||
project_id: 'gitlab-org%2Fcli'
|
||||
|
||||
- name: get list of gitlab releases
|
||||
uri:
|
||||
url:
|
||||
'{{gitlab_api}}/projects/{{project_id}}/releases'
|
||||
register: releases
|
||||
|
||||
- set_fact:
|
||||
latest: '{{releases.json[0]}}'
|
||||
latest_version: '{{releases.json[0].tag_name}}'
|
||||
query: >
|
||||
[?contains(name, `glab`)] |
|
||||
[?contains(name, `Linux`)] |
|
||||
[?contains(name, `{{ansible_machine}}.deb`)] | [0]
|
||||
- set_fact:
|
||||
asset: '{{latest.assets.links|json_query(query)}}'
|
||||
|
||||
- name: create download directory
|
||||
when: glab_version is not defined or glab_version != latest_version
|
||||
tempfile:
|
||||
state: directory
|
||||
suffix: glab
|
||||
register: tempdir
|
||||
|
||||
- name: download .deb file
|
||||
when: glab_version is not defined or glab_version != latest_version
|
||||
get_url:
|
||||
url: '{{asset.url}}'
|
||||
dest: '{{tempdir.path}}/glab.deb'
|
||||
|
||||
- name: install .deb file
|
||||
when: glab_version is not defined or glab_version != latest_version
|
||||
become: true
|
||||
apt:
|
||||
deb: '{{tempdir.path}}/glab.deb'
|
||||
|
||||
- name: remove download directory
|
||||
when: glab_version is not defined or glab_version != latest_version
|
||||
file:
|
||||
state: absent
|
||||
path: '{{tempdir.path}}'
|
||||
|
||||
- name: install zsh completions
|
||||
when: glab_version is not defined or glab_version != latest_version
|
||||
command:
|
||||
glab completion -s zsh > ~/.local/share/zsh/site-functions/_glab
|
||||
5
roles/glab/tasks/Windows.yaml
Normal file
5
roles/glab/tasks/Windows.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: install chocolatey package
|
||||
win_chocolatey:
|
||||
name: glab
|
||||
state: latest
|
||||
2
roles/glab/tasks/main.yaml
Normal file
2
roles/glab/tasks/main.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
- include_tasks: '{{ansible_os_family}}.yaml'
|
||||
10
roles/iterm/tasks/main.yaml
Normal file
10
roles/iterm/tasks/main.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
- assert:
|
||||
that: ansible_os_family == "Darwin"
|
||||
|
||||
- name: install homebrew package
|
||||
homebrew_cask:
|
||||
name: iterm2
|
||||
state: latest
|
||||
|
||||
# TODO: Configure stuff, somehow?
|
||||
@@ -4,9 +4,12 @@
|
||||
url: https://api.github.com/repos/jmespath/jp/releases/latest
|
||||
register: latest
|
||||
|
||||
# TODO: Support arm64
|
||||
- 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}}'
|
||||
latest_version: '{{latest.json.tag_name}}'
|
||||
jp_exe: '{{ansible_env.HOME}}/.local/bin/jp'
|
||||
@@ -14,7 +17,7 @@
|
||||
- name: check if already installed
|
||||
stat:
|
||||
path: '{{jp_exe}}'
|
||||
register: jp_exe
|
||||
register: jp_stat
|
||||
|
||||
- name: get installed version
|
||||
when: jp_stat.stat.exists == True
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
- name: install apt package
|
||||
become: true
|
||||
apt:
|
||||
name: jq
|
||||
state: latest
|
||||
|
||||
2
roles/llvm/tasks/Linux Mint.yaml
Normal file
2
roles/llvm/tasks/Linux Mint.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
- include_tasks: Ubuntu.yaml
|
||||
2
roles/llvm/tasks/Pop!_OS.yaml
Normal file
2
roles/llvm/tasks/Pop!_OS.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
- include_tasks: Ubuntu.yaml
|
||||
@@ -4,14 +4,27 @@
|
||||
url: https://api.github.com/repos/llvm/llvm-project/releases/latest
|
||||
register: llvm_latest
|
||||
|
||||
- name: read /etc/os-release
|
||||
slurp:
|
||||
src: /etc/os-release
|
||||
register: os_release_b64
|
||||
- name: extract UBUNTU_CODENAME=<name> to support dirivitive distros
|
||||
set_fact:
|
||||
ubuntu_codename: >-
|
||||
{{
|
||||
os_release_b64.content | b64decode |
|
||||
regex_search('UBUNTU_CODENAME=.*') |
|
||||
replace('UBUNTU_CODENAME=', '')
|
||||
}}
|
||||
|
||||
- set_fact:
|
||||
llvm_major_version:
|
||||
'{{llvm_latest.json.tag_name[8:llvm_latest.json.tag_name.find(".")]}}'
|
||||
- set_fact:
|
||||
llvm_apt_repo_url:
|
||||
'http://apt.llvm.org/{{ansible_distribution_release}}/'
|
||||
'http://apt.llvm.org/{{ubuntu_codename}}/'
|
||||
llvm_apt_category:
|
||||
'llvm-toolchain-{{ansible_distribution_release}}-{{llvm_major_version}}'
|
||||
'llvm-toolchain-{{ubuntu_codename}}-{{llvm_major_version}}'
|
||||
|
||||
- name: add upstream deb repository
|
||||
become: true
|
||||
|
||||
8
roles/magnet/tasks/main.yaml
Normal file
8
roles/magnet/tasks/main.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
- assert:
|
||||
that: ansible_os_family == 'Darwin'
|
||||
|
||||
- name: install app store package
|
||||
mas:
|
||||
id: 441258766
|
||||
state: latest
|
||||
8
roles/mas/tasks/main.yaml
Normal file
8
roles/mas/tasks/main.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
- assert:
|
||||
that: ansible_os_family == 'Darwin'
|
||||
|
||||
- name: install homebrew package
|
||||
homebrew:
|
||||
name: mas
|
||||
state: latest
|
||||
8
roles/microsoft-remote-desktop/tasks/main.yaml
Normal file
8
roles/microsoft-remote-desktop/tasks/main.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
- assert:
|
||||
that: ansible_os_family == "Darwin"
|
||||
|
||||
- name: install homebrew cask
|
||||
homebrew_cask:
|
||||
name: microsoft-remote-desktop
|
||||
state: latest
|
||||
@@ -1,4 +1,12 @@
|
||||
---
|
||||
- name: add neovim stable ppa
|
||||
when: ansible_distribution == 'Ubuntu' and
|
||||
ansible_distribution_version == '20.04'
|
||||
become: true
|
||||
apt_repository:
|
||||
repo: ppa:neovim-ppa/stable
|
||||
update_cache: true
|
||||
|
||||
- name: install apt package
|
||||
become: true
|
||||
apt:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: install homebrew package
|
||||
homebrew:
|
||||
homebrew_cask:
|
||||
name: obsidian
|
||||
state: latest
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
git:
|
||||
repo: git@github.com:kbenzie/notes.git
|
||||
dest: '{{ansible_env.HOME}}/Documents/Notes'
|
||||
branch: main
|
||||
version: main
|
||||
|
||||
@@ -6,3 +6,9 @@
|
||||
win_chocolatey:
|
||||
name: prusaslicer
|
||||
state: latest
|
||||
|
||||
- name: create start menu shortcut
|
||||
win_shortcut:
|
||||
src: '{{ansible_env.ProgramData}}/chocolatey/bin/prusa-slicer.exe'
|
||||
dest: '{{ansible_env.ProgramData}}/Microsoft/Windows/Start Menu/Programs/PrusaSlicer.lnk'
|
||||
icon: '{{ansible_env.ProgramData}}/chocolatey/bin/prusa-slicer.exe,0'
|
||||
|
||||
@@ -6,20 +6,18 @@
|
||||
|
||||
# TODO: set repo email
|
||||
|
||||
- name: install pip packages
|
||||
pip:
|
||||
name: '{{python_pip_packages}}'
|
||||
state: latest
|
||||
extra_args: --user
|
||||
|
||||
- name: create directories
|
||||
- name: create config directories
|
||||
file:
|
||||
state: directory
|
||||
dest: '{{item}}'
|
||||
path: '{{item}}'
|
||||
with_items:
|
||||
- ~/.config
|
||||
- ~/.config/ipython/profile_default
|
||||
- ~/.config/pip
|
||||
|
||||
# Ensure that pip.conf exists before ever installing pip packages since
|
||||
# Debian has enabled `EXTERNALLY-MANAGED` from PEP 668 which breaks `pip
|
||||
# install --user` unless configured otherwise.
|
||||
- name: create symbolic links
|
||||
file:
|
||||
state: link
|
||||
@@ -34,3 +32,17 @@
|
||||
dest: ~/.config/ipython/profile_default/ipython_config.py
|
||||
- src: ~/.config/python/pip.conf
|
||||
dest: ~/.config/pip/pip.conf
|
||||
|
||||
- name: install pip packages
|
||||
pip:
|
||||
name: '{{python_pip_packages}}'
|
||||
state: latest
|
||||
extra_args: --user
|
||||
|
||||
- name: create directories
|
||||
file:
|
||||
state: directory
|
||||
dest: '{{item}}'
|
||||
with_items:
|
||||
- ~/.config/ipython/profile_default
|
||||
- ~/.config/pip
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- include_tasks: '{{ansible_os_family}}.yaml'
|
||||
|
||||
- include_tasks: 'unix.yaml'
|
||||
- include_tasks: 'Unix.yaml'
|
||||
when: ansible_os_family != "Windows"
|
||||
|
||||
@@ -5,6 +5,7 @@ python_pip_packages:
|
||||
- ipdb
|
||||
- ipython
|
||||
- isort
|
||||
- jmespath
|
||||
- pylint
|
||||
- python-gist
|
||||
- yapf
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
- 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: root
|
||||
group: root
|
||||
owner: '{{sudo_owner}}'
|
||||
group: '{{sudo_group}}'
|
||||
mode: '0440'
|
||||
|
||||
3
roles/sudo/vars/Darwin.yaml
Normal file
3
roles/sudo/vars/Darwin.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
sudo_owner: root
|
||||
sudo_group: wheel
|
||||
3
roles/sudo/vars/Debian.yaml
Normal file
3
roles/sudo/vars/Debian.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
sudo_owner: root
|
||||
sudo_group: root
|
||||
@@ -3,6 +3,21 @@
|
||||
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
|
||||
|
||||
@@ -3,7 +3,34 @@
|
||||
homebrew:
|
||||
name:
|
||||
- tmux
|
||||
- osx-cpu-temp
|
||||
- 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,12 +1,26 @@
|
||||
---
|
||||
- name: install apt packages
|
||||
become: true
|
||||
package:
|
||||
apt:
|
||||
name:
|
||||
- tmux
|
||||
- gawk
|
||||
- jq
|
||||
- sysstat
|
||||
- urlview
|
||||
- xclip
|
||||
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
|
||||
|
||||
@@ -3,8 +3,22 @@
|
||||
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
|
||||
|
||||
8
roles/viscosity/tasks/main.yaml
Normal file
8
roles/viscosity/tasks/main.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
- assert:
|
||||
that: ansible_os_family == "Darwin"
|
||||
|
||||
- name: install homebrew package
|
||||
homebrew_cask:
|
||||
name: viscosity
|
||||
state: latest
|
||||
6
roles/watch/tasks/main.yaml
Normal file
6
roles/watch/tasks/main.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: install homebrew package
|
||||
when: ansible_os_family == "Darwin"
|
||||
homebrew:
|
||||
name: watch
|
||||
state: latest
|
||||
8
roles/webcatalog/tasks/main.yaml
Normal file
8
roles/webcatalog/tasks/main.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
- assert:
|
||||
that: ansible_os_family == "Darwin"
|
||||
|
||||
- name: install homebrew package
|
||||
homebrew_cask:
|
||||
name: webcatalog
|
||||
state: latest
|
||||
@@ -36,7 +36,7 @@
|
||||
- name: copy win_git files to ansible modules directory
|
||||
copy:
|
||||
src: '~/.config/local/external/ansible-win_git/{{item}}'
|
||||
dest: '~/.ansible/plugins/modules/{{item}}'
|
||||
dest: '~/.config/local/modules/{{item}}'
|
||||
with_items:
|
||||
- win_git.ps1
|
||||
- win_git.py
|
||||
|
||||
@@ -64,6 +64,19 @@
|
||||
loop_control:
|
||||
label: '{{item.dest}}'
|
||||
|
||||
- name: list commands with available completions
|
||||
command:
|
||||
zsh {{ansible_env.HOME}}/.config/zsh/list-commands-with-available-completions.zsh
|
||||
changed_when: false
|
||||
register: completion_commands
|
||||
|
||||
- name: install completions for available commands
|
||||
file:
|
||||
state: link
|
||||
src: '~/.config/zsh/zsh-completions/src/_{{item}}'
|
||||
dest: '~/.local/share/zsh/site-functions/_{{item}}'
|
||||
with_items: '{{completion_commands.stdout}}'
|
||||
|
||||
- name: get absolute path
|
||||
shell: command -v zsh
|
||||
register: zsh
|
||||
|
||||
Reference in New Issue
Block a user