14 Commits

Author SHA1 Message Date
b970cbc8ca Update kitty to install from GitHub on Debian
Older version of kitty have terrible font rendering on Linux, e.g. the
one shipped with Ubuntu 22.04, so instead install the latest version
from the provided GitHub packages.
2024-04-19 20:50:44 +01:00
e330c3d072 Fix use of stow to not fold directories 2024-04-19 20:50:23 +01:00
5309683d94 Add support for proxy networks & cleanup playbook vars 2024-04-19 13:17:53 +01:00
a1296840f6 Fix python role, actuall remove old pip.conf 2024-04-15 11:29:58 +01:00
5c78bd1da3 Add system-info macOS user service 2024-04-14 15:55:41 +01:00
7379986378 Run tmux install.sh instead of tasks.yaml 2024-04-13 16:30:30 +01:00
d5fc2c3c13 Move zsh install login into script
Enable installing zsh config repo standalone, i.e. without Ansible,
invoke the `install.zsh` script instead.
2024-04-13 16:12:24 +01:00
dc6b7776ff Update config repo branches for tmux & zsh 2024-04-13 14:36:22 +01:00
3fa17e5517 Fix ulauncher role on Fedora 2024-04-11 23:56:54 +01:00
ace72f755a Add ulauncher role 2024-04-11 21:35:28 +01:00
c4c03aabf4 Make guake package become root 2024-04-09 23:18:43 +01:00
e82bff66ce Don't install pynvim globally on Debian
For PEP 668 reasons.
2024-04-09 19:41:31 +01:00
947a6f1b87 Remove python config repo & use templates instead 2024-04-09 19:27:49 +01:00
9bf8c46bb9 Create pip.conf from a template, handle proxy network 2024-04-09 19:09:40 +01:00
42 changed files with 327 additions and 141 deletions

View File

@@ -1,4 +1,6 @@
--- ---
- hosts: localhost - hosts: localhost
vars_files:
- vars/environment.yaml
roles: roles:
- 1password - 1password

View File

@@ -2,15 +2,14 @@
- import_playbook: LinuxCLI.yaml - import_playbook: LinuxCLI.yaml
- import_playbook: UnixGUI.yaml - import_playbook: UnixGUI.yaml
- hosts: localhost - hosts: localhost
vars: vars_files:
github_auth_headers: >- - vars/environment.yaml
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
roles: roles:
- role: firefox - role: firefox
- role: kitty - role: kitty
- role: guake - role: guake
- role: cider - role: cider
- role: ulauncher
- role: gnome-shell - role: gnome-shell
when: "'GNOME' in ansible_env.XDG_CURRENT_DESKTOP" when: "'GNOME' in ansible_env.XDG_CURRENT_DESKTOP"
- role: xremap - role: xremap

View File

@@ -1,14 +1,14 @@
--- ---
- hosts: localhost - hosts: localhost
vars: vars_files:
github_auth_headers: >- - vars/environment.yaml
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
roles: roles:
- role: rpmfusion - role: rpmfusion
when: ansible_os_family == 'RedHat' and ansible_distribution == 'Fedora' when: ansible_os_family == 'RedHat' and ansible_distribution == 'Fedora'
- import_playbook: UnixCLI.yaml - import_playbook: UnixCLI.yaml
- hosts: localhost - hosts: localhost
vars_files:
- vars/environment.yaml
roles: roles:
- role: gdb - role: gdb
- role: podman - role: podman

View File

@@ -1,9 +1,7 @@
--- ---
- hosts: localhost - hosts: localhost
vars: vars_files:
github_auth_headers: >- - vars/environment.yaml
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
roles: roles:
- role: sudo - role: sudo
when: ansible_user_id != "root" when: ansible_user_id != "root"

View File

@@ -1,9 +1,7 @@
--- ---
- hosts: localhost - hosts: localhost
vars: vars_files:
github_auth_headers: >- - vars/environment.yaml
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
roles: roles:
- role: flatpak - role: flatpak
when: ansible_os_family != "Darwin" when: ansible_os_family != "Darwin"

View File

@@ -1,9 +1,7 @@
--- ---
- import_playbook: LinuxCLI.yaml - import_playbook: LinuxCLI.yaml
- hosts: localhost - hosts: localhost
vars: vars_files:
github_auth_headers: >- - vars/environment.yaml
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
roles: roles:
- role: wsl - role: wsl

View File

@@ -1,9 +1,7 @@
--- ---
- hosts: windows - hosts: windows
vars: vars_files:
github_auth_headers: >- - vars/environment.yaml
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
roles: roles:
- role: python - role: python
- role: git - role: git

View File

@@ -1,14 +1,14 @@
--- ---
- import_playbook: UnixCLI.yaml - import_playbook: UnixCLI.yaml
- hosts: localhost - hosts: localhost
vars_files:
- vars/environment.yaml
roles: roles:
- role: system-info - role: system-info
- import_playbook: UnixGUI.yaml - import_playbook: UnixGUI.yaml
- hosts: localhost - hosts: localhost
vars: vars_files:
github_auth_headers: >- - vars/environment.yaml
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
roles: roles:
- role: mas - role: mas

View File

@@ -0,0 +1,15 @@
---
# GitHub may rate limit unauthenticated API requests, this is more likely when
# behind a network proxy. Set the GITHUB_TOKEN environment variable to
# authenticate any GitHub API requests executed while playing roles.
github_auth_headers: >-
{{ { 'Authorization': 'Bearer ' + lookup('env', 'GITHUB_TOKEN') }
if lookup('env', 'GITHUB_TOKEN') else {} }}
# When working behind a network proxy, set the http_proxy and https_proxy
# environment variables. These will be passed through to uses of the `get_url`
# module when playing roles.
proxy_environment: >-
{{ { 'http_proxy': lookup('env', 'http_proxy'),
'https_proxy': lookup('env', 'https_proxy') }
if lookup('env', 'http_proxy') and lookup('env', 'https_proxy') else {} }}

View File

@@ -16,6 +16,7 @@
get_url: get_url:
url: https://downloads.1password.com/linux/keys/1password.asc url: https://downloads.1password.com/linux/keys/1password.asc
dest: '{{keyring}}' dest: '{{keyring}}'
environment: '{{proxy_environment}}'
- name: set compatible architecture - name: set compatible architecture
when: ansible_machine == 'x86_64' when: ansible_machine == 'x86_64'

View File

@@ -16,6 +16,7 @@
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}}'
environment: '{{proxy_environment}}'
- name: run installer - name: run installer
when: not app_stat.stat.exists when: not app_stat.stat.exists
@@ -68,6 +69,7 @@
win_get_url: win_get_url:
url: '{{latest.downloads.Windows.amd64}}' url: '{{latest.downloads.Windows.amd64}}'
dest: '{{cli_zip}}' dest: '{{cli_zip}}'
environment: '{{proxy_environment}}'
- name: unzip op zip archive - name: unzip op zip archive
when: cli_installed_version is not defined or cli_installed_version != latest.version when: cli_installed_version is not defined or cli_installed_version != latest.version

View File

@@ -51,6 +51,7 @@
get_url: get_url:
url: '{{asset.browser_download_url}}' url: '{{asset.browser_download_url}}'
dest: '{{bat_deb}}' dest: '{{bat_deb}}'
environment: '{{proxy_environment}}'
- name: install .deb file - name: install .deb file
when: installed_version is not defined or installed_version != latest_version when: installed_version is not defined or installed_version != latest_version

View File

@@ -17,6 +17,7 @@
get_url: get_url:
url: https://packages.mozilla.org/apt/repo-signing-key.gpg url: https://packages.mozilla.org/apt/repo-signing-key.gpg
dest: /etc/apt/keyrings/packages.mozilla.org.asc dest: /etc/apt/keyrings/packages.mozilla.org.asc
environment: '{{proxy_environment}}'
- name: add mozilla apt repo - name: add mozilla apt repo
become: true become: true

View File

@@ -37,6 +37,7 @@
get_url: get_url:
url: '{{asset.browser_download_url}}' url: '{{asset.browser_download_url}}'
dest: '{{ansible_env.HOME}}/.local/share/fonts/tmp.zip' dest: '{{ansible_env.HOME}}/.local/share/fonts/tmp.zip'
environment: '{{proxy_environment}}'
- name: install Caskaydia Cove Nerd Font - name: install Caskaydia Cove Nerd Font
when: needs_installed when: needs_installed

View File

@@ -15,6 +15,7 @@
url: https://cli.github.com/packages/githubcli-archive-keyring.gpg url: https://cli.github.com/packages/githubcli-archive-keyring.gpg
dest: /usr/share/keyrings/githubcli-archive-keyring.gpg dest: /usr/share/keyrings/githubcli-archive-keyring.gpg
mode: 0644 mode: 0644
environment: '{{proxy_environment}}'
- name: add apt repository list - name: add apt repository list
become: true become: true

View File

@@ -4,6 +4,7 @@
get_url: get_url:
url: https://cli.github.com/packages/rpm/gh-cli.repo url: https://cli.github.com/packages/rpm/gh-cli.repo
dest: /etc/yum.repos.d/gh-cli.repo dest: /etc/yum.repos.d/gh-cli.repo
environment: '{{proxy_environment}}'
- name: install dnf package - name: install dnf package
become: true become: true

View File

@@ -19,6 +19,7 @@
win_get_url: win_get_url:
url: '{{git_asset.browser_download_url}}' url: '{{git_asset.browser_download_url}}'
dest: '{{git_installer_path}}' dest: '{{git_installer_path}}'
environment: '{{proxy_environment}}'
- name: run installer command - name: run installer command
win_command: win_command:

View File

@@ -40,10 +40,11 @@
url: '{{asset.browser_download_url}}' url: '{{asset.browser_download_url}}'
dest: '{{tea_package_exe}}' dest: '{{tea_package_exe}}'
mode: '0755' mode: '0755'
environment: '{{proxy_environment}}'
- name: install package - name: install package
when: install_required when: install_required
become: true become: true
command: command:
cmd: 'stow --target /usr/local .' cmd: 'stow --no-folding --target /usr/local .'
chdir: '{{tea_package_dir}}' chdir: '{{tea_package_dir}}'

View File

@@ -48,6 +48,7 @@
get_url: get_url:
url: '{{asset.url}}' url: '{{asset.url}}'
dest: '{{tempdir.path}}/glab.deb' dest: '{{tempdir.path}}/glab.deb'
environment: '{{proxy_environment}}'
- name: install .deb file - name: install .deb file
when: glab_version is not defined or glab_version != latest_version when: glab_version is not defined or glab_version != latest_version

View File

@@ -3,6 +3,7 @@
that: ansible_os_family != 'Darwin' and ansible_os_family != 'Windows' that: ansible_os_family != 'Darwin' and ansible_os_family != 'Windows'
- name: install package - name: install package
become: true
package: package:
name: guake name: guake
state: latest state: latest

View File

@@ -40,3 +40,4 @@
url: '{{asset.browser_download_url}}' url: '{{asset.browser_download_url}}'
dest: '{{jp_exe}}' dest: '{{jp_exe}}'
mode: +x mode: +x
environment: '{{proxy_environment}}'

View File

@@ -50,3 +50,4 @@
url: '{{asset.browser_download_url}}' url: '{{asset.browser_download_url}}'
dest: '{{ansible_env.HOME}}/.local/bin/jp' dest: '{{ansible_env.HOME}}/.local/bin/jp'
mode: '0755' mode: '0755'
environment: '{{proxy_environment}}'

View File

@@ -1,6 +1,98 @@
--- ---
- name: install apt package - name: remove apt package
become: true become: true
apt: apt:
name: kitty name: kitty
state: latest state: absent
- name: get latest version
uri:
url: https://api.github.com/repos/kovidgoyal/kitty/releases/latest
headers: '{{github_auth_headers}}'
register: latest
- set_fact:
kitty_latest_version: '{{latest.json.tag_name[1:]}}'
kitty_exe: /usr/local/bin/kitty
kitty_package_dir: /usr/local/stow/kitty
- name: check if already installed
stat:
path: '{{kitty_exe}}'
register: kitty
- name: get installed version
when: kitty.stat.exists
command: '{{kitty_exe}} --version'
register: kitty_version
changed_when: false
- when: kitty.stat.exists
set_fact:
kitty_install_version:
'{{kitty_version.stdout | regex_replace("^.*(\d+\.\d+\.\d+).*$", "\1")}}'
- set_fact:
kitty_asset_query: >
[? contains(name,
`kitty-{{kitty_latest_version}}-{{ansible_architecture}}.txz`)] | [0]
- set_fact:
kitty_install_required: >
{{ kitty_install_version is not defined or
kitty_latest_version != kitty_install_version }}
kitty_asset: "{{ latest.json.assets | json_query(kitty_asset_query) }}"
- name: uninstall package
when: kitty_install_required and kitty.stat.exists
become: true
command:
cmd: 'stow --delete --target /usr/local .'
chdir: '{{kitty_package_dir}}'
- name: remove outdated package
when: kitty_install_required and kitty.stat.exists
become: true
file:
state: absent
path: '{{kitty_package_dir}}'
- set_fact:
kitty_package_archive: '{{kitty_package_dir}}/{{kitty_asset.name}}'
- name: create package directory
become: true
file:
state: directory
path: '{{kitty_package_dir}}'
- name: download package
when: kitty_install_required
become: true
get_url:
url: '{{kitty_asset.browser_download_url}}'
dest: '{{kitty_package_archive}}'
environment: '{{proxy_environment}}'
- name: decompress package
when: kitty_install_required
become: true
unarchive:
src: '{{kitty_package_archive}}'
dest: '{{kitty_package_dir}}'
owner: root
group: staff
- name: remove package archive
when: kitty_install_required
become: true
file:
state: absent
path: '{{kitty_package_archive}}'
- name: install package
when: kitty_install_required
become: true
command:
cmd: 'stow --no-folding --target /usr/local .'
chdir: '{{kitty_package_dir}}'

View File

@@ -57,6 +57,7 @@
get_url: get_url:
url: https://apt.llvm.org/llvm-snapshot.gpg.key url: https://apt.llvm.org/llvm-snapshot.gpg.key
dest: '{{keyring}}' dest: '{{keyring}}'
environment: '{{proxy_environment}}'
- name: add upstream deb repository - name: add upstream deb repository
become: true become: true

View File

@@ -9,6 +9,28 @@
name: neovim name: neovim
state: absent state: absent
- set_fact:
old_package_dir: '/usr/local/lib/nvim/nvim-linux64'
- name: check if old package directory exists
stat:
path: '{{old_package_dir}}'
register: old_package
- name: uninstall package from old directory
when: old_package.stat.exists
become: true
command:
cmd: 'stow --delete --target /usr/local .'
chdir: '{{old_package_dir}}'
- name: remove old package directory
when: old_package.stat.exists
become: true
file:
state: absent
path: '{{old_package_dir}}'
- name: install gnu stow for managing tar.gz package - name: install gnu stow for managing tar.gz package
become: true become: true
apt: apt:
@@ -17,7 +39,6 @@
state: latest state: latest
- name: install python provider pip package - name: install python provider pip package
become: true
pip: pip:
name: pynvim name: pynvim
state: latest state: latest
@@ -48,7 +69,7 @@
'{{installed_version is not defined or '{{installed_version is not defined or
installed_version != latest.json.tag_name}}' installed_version != latest.json.tag_name}}'
asset_query: '[?contains(name, `nvim-linux64.tar.gz`)]' asset_query: '[?contains(name, `nvim-linux64.tar.gz`)]'
package_dir: '/usr/local/lib/nvim' package_dir: '/usr/local/stow/nvim'
- set_fact: - set_fact:
uninstall_required: '{{nvim.stat.exists and install_required}}' uninstall_required: '{{nvim.stat.exists and install_required}}'
asset: '{{latest.json.assets | json_query(asset_query)}}' asset: '{{latest.json.assets | json_query(asset_query)}}'
@@ -80,6 +101,7 @@
get_url: get_url:
url: '{{asset[0].browser_download_url}}' url: '{{asset[0].browser_download_url}}'
dest: '{{package_path}}' dest: '{{package_path}}'
environment: '{{proxy_environment}}'
- name: extract package archive - name: extract package archive
when: install_required when: install_required
@@ -108,7 +130,7 @@
when: install_required when: install_required
become: true become: true
command: command:
cmd: 'stow --target /usr/local .' cmd: 'stow --no-folding --target /usr/local .'
chdir: '{{package_dir}}/nvim-linux64' chdir: '{{package_dir}}/nvim-linux64'
- include_tasks: Unix.yaml - include_tasks: Unix.yaml

View File

@@ -13,6 +13,7 @@
get_url: get_url:
url: 'https://nodejs.org/dist/{{latest.json[0].version}}/node-{{latest.json[0].version}}-linux-x64.tar.gz' url: 'https://nodejs.org/dist/{{latest.json[0].version}}/node-{{latest.json[0].version}}-linux-x64.tar.gz'
dest: ~/.local/src/node/node.tar.gz dest: ~/.local/src/node/node.tar.gz
environment: '{{proxy_environment}}'
- name: extract downloaded package - name: extract downloaded package
unarchive: unarchive:

View File

@@ -1,7 +1,13 @@
--- ---
- name: install config repo - name: stat old config repo
git: stat:
repo: git@code.infektor.net:config/python.git path: ~/.config/python/.git
register: config_python_git
- name: remove old config repo
when: config_python_git.stat.exists
file:
state: absent
dest: ~/.config/python dest: ~/.config/python
- name: create config directories - name: create config directories
@@ -13,34 +19,45 @@
- ~/.config/ipython/profile_default - ~/.config/ipython/profile_default
- ~/.config/pip - ~/.config/pip
# Ensure that pip.conf exists before ever installing pip packages since - name: stat pip.conf
# Debian has enabled `EXTERNALLY-MANAGED` from PEP 668 which breaks `pip stat:
# install --user` unless configured otherwise. path: ~/.config/pip/pip.conf
- name: create symbolic links register: pip_conf
- name: remove pip.conf if its a symbolic link
when: pip_conf.stat.islnk
file: file:
state: link state: absent
src: '{{item.src}}' path: ~/.config/pip/pip.conf
dest: '{{item.dest}}'
with_items: # Ensure that pip.conf exists before ever installing pip packages since Debian
- src: ~/.config/python/flake8 # has enabled `EXTERNALLY-MANAGED` from PEP 668 which breaks `pip install
dest: ~/.config/flake8 # --user` unless configured otherwise.
- src: ~/.config/python/pylintrc - name: create user pip.conf from template
dest: ~/.pylintrc template:
- src: ~/.config/python/ipython_config.py src: pip.conf.j2
dest: ~/.config/ipython/profile_default/ipython_config.py dest: ~/.config/pip/pip.conf
- src: ~/.config/python/pip.conf
dest: ~/.config/pip/pip.conf # TODO: Also configure pip to disable `EXTERNALLY-MANAGED` globally?
- name: stat old ipython_config.py
stat:
path: ~/.config/ipython/profile_default/ipython_config.py
register: ipython_config_py
- name: remove ipython_conifg.py if its a symbolic link
when: ipython_config_py.stat.islnk
file:
state: absent
path: ~/.config/ipython/profile_default/ipython_config.py
- name: create ipython config from template
template:
src: ipython_config.py
dest: ~/.config/ipython/profile_default/ipython_config.py
- name: install pip packages - name: install pip packages
pip: pip:
name: '{{python_pip_packages}}' name: '{{python_pip_packages}}'
state: latest state: latest
extra_args: --user extra_args: --user
- name: create directories
file:
state: directory
dest: '{{item}}'
with_items:
- ~/.config/ipython/profile_default
- ~/.config/pip

View File

@@ -0,0 +1 @@
c.TerminalInteractiveShell.editing_mode = 'vi'

View File

@@ -0,0 +1,8 @@
[global]
break-system-packages = true
{% if ansible_env.http_proxy is defined %}
proxy = {{ ansible_env.http_proxy }}
{% endif %}
[list]
format=columns

View File

@@ -1,4 +1,25 @@
--- ---
# TODO: create a launchd module that handles user mode services - name: get list of running launchd services
# cp $script_dir/system-info.plist ~/Library/LaunchAgents/system-info.plist command: launchctl list
# launchctl load -w ~/Library/LaunchAgents/system-info.plist register: launchd_running_services
changed_when: false
- name: determine if system-info is currently running
set_fact:
system_info_debug: true
system_info_plist_path: '{{ansible_env.HOME}}/Library/LaunchAgents/system-info.plist'
system_info_running: "{{'system-info' in launchd_running_services.stdout}}"
- name: install system-info launchd plist
template:
src: system-info.plist.j2
dest: '{{system_info_plist_path}}'
register: system_info_plist
- name: unload running system-info launchd service
when: system_info_plist.changed and system_info_running
command: 'launchctl unload -w {{system_info_plist_path}}'
- name: load system-info launchd service
when: system_info_plist.changed or not system_info_running
command: 'launchctl load -w {{system_info_plist_path}}'

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>system-info</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
</dict>
<key>Program</key>
<string>{{ansible_env.HOME}}/.config/tmux/system-info/system-info-macOS.sh</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>

View File

@@ -18,6 +18,7 @@
get_url: get_url:
url: https://gist.githubusercontent.com/nicm/ea9cf3c93f22e0246ec858122d9abea1/raw/37ae29fc86e88b48dbc8a674478ad3e7a009f357/tmux-256color url: https://gist.githubusercontent.com/nicm/ea9cf3c93f22e0246ec858122d9abea1/raw/37ae29fc86e88b48dbc8a674478ad3e7a009f357/tmux-256color
dest: ~/tmux-256color dest: ~/tmux-256color
environment: '{{proxy_environment}}'
- name: compile terminal info - name: compile terminal info
when: terminfo_exists.rc == 1 when: terminfo_exists.rc == 1

View File

@@ -5,6 +5,9 @@
git: git:
repo: git@code.infektor.net:config/tmux.git repo: git@code.infektor.net:config/tmux.git
dest: ~/.config/tmux dest: ~/.config/tmux
version: master version: main
- include_tasks: ~/.config/tmux/tasks.yaml - name: run install script
command: ~/.config/tmux/install.sh
register: tmux_install
changed_when: "'changed' in tmux_install.stdout"

View File

@@ -0,0 +1,32 @@
---
- name: install keyring
when: ansible_distribution == 'Debian'
become: true
get_url:
url: '{{ulauncher_keyring_url}}'
dest: '{{ulauncher_keyring_path}}'
mode: '0644'
force: true
environment: '{{proxy_environment}}'
- name: add apt sources list
when: ansible_distribution == 'Debian'
become: true
copy:
content: >-
deb [signed-by={{ulauncher_keyring_path}}]
http://ppa.launchpad.net/agornostal/ulauncher/ubuntu
{{ansible_distribution_release}} main"
dest: '{{ulauncher_apt_sources_list_path}}'
- name: add ppa repository
when: ansible_distribution != 'Debian'
become: true
apt_repository:
repo: ppa:agornostal/ulauncher
- name: install apt package
become: true
apt:
name: ulauncher
state: latest

View File

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

View File

@@ -0,0 +1,2 @@
---
- include_tasks: '{{ansible_os_family}}.yaml'

View File

@@ -0,0 +1,4 @@
---
ulauncher_keyring_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x59ebde772980c381ca13fa59faf1020699503176
ulauncher_keyring_path: /usr/share/keyrings/ulauncher-archive-keyring.gpg
ulauncher_apt_list_path: /etc/apt/sources.list.d/ulauncher.list

View File

@@ -28,6 +28,7 @@
url: 'https://cdn-2.webcatalog.io/webcatalog/{{appimage}}' url: 'https://cdn-2.webcatalog.io/webcatalog/{{appimage}}'
dest: '{{ansible_env.HOME}}/.local/bin/{{appimage}}' dest: '{{ansible_env.HOME}}/.local/bin/{{appimage}}'
mode: '0755' mode: '0755'
environment: '{{proxy_environment}}'
- name: create directories - name: create directories
file: file:

View File

@@ -63,6 +63,7 @@
get_url: get_url:
url: '{{asset.browser_download_url}}' url: '{{asset.browser_download_url}}'
dest: '{{install_dir}}/xremap.zip' dest: '{{install_dir}}/xremap.zip'
environment: '{{proxy_environment}}'
- name: extract release archive - name: extract release archive
when: needs_installed when: needs_installed

View File

@@ -36,3 +36,4 @@
url: '{{asset.browser_download_url}}' url: '{{asset.browser_download_url}}'
dest: '{{yq_exe}}' dest: '{{yq_exe}}'
mode: +x mode: +x
environment: '{{proxy_environment}}'

View File

@@ -50,3 +50,4 @@
url: '{{asset.browser_download_url}}' url: '{{asset.browser_download_url}}'
dest: '{{ansible_env.HOME}}/.local/bin/yq' dest: '{{ansible_env.HOME}}/.local/bin/yq'
mode: '0755' mode: '0755'
environment: '{{proxy_environment}}'

View File

@@ -5,82 +5,12 @@
git: git:
repo: git@code.infektor.net:config/zsh.git repo: git@code.infektor.net:config/zsh.git
dest: ~/.config/zsh dest: ~/.config/zsh
version: master version: main
- name: clone plugin repos - name: run install script
git: command: ~/.config/zsh/install.zsh
repo: '{{item.repo}}' register: zsh_install
dest: '{{item.dest}}' changed_when: "'changed' in zsh_install.stdout"
with_items:
- repo: https://github.com/zsh-users/zsh-autosuggestions.git
dest: ~/.config/zsh/zsh-autosuggestions
- repo: https://github.com/zsh-users/zsh-history-substring-search.git
dest: ~/.config/zsh/zsh-history-substring-search
- repo: https://github.com/zsh-users/zsh-syntax-highlighting.git
dest: ~/.config/zsh/zsh-syntax-highlighting
- repo: https://github.com/zsh-users/zsh-completions.git
dest: ~/.config/zsh/zsh-completions
loop_control:
label: '{{item.repo | regex_search("https://github.com/(.*)\.git$", "\1")}}'
- name: create directories
file:
state: directory
dest: '{{item}}'
with_items:
- ~/.local/bin
- ~/.local/share/zsh/site-functions
- name: create symbolic links
file:
state: link
src: '{{item.src}}'
dest: '{{item.dest}}'
with_items:
- src: ~/.config/zsh/zlogin
dest: ~/.zlogin
- src: ~/.config/zsh/zlogout
dest: ~/.zlogout
- src: ~/.config/zsh/zprofile
dest: ~/.zprofile
- src: ~/.config/zsh/zshenv
dest: ~/.zshenv
- src: ~/.config/zsh/zshrc
dest: ~/.zshrc
- src: ~/.config/zsh/prompt_fresh_setup
dest: ~/.local/share/zsh/site-functions/prompt_fresh_setup
- src: ~/.config/zsh/build/_build-dir
dest: ~/.local/share/zsh/site-functions/_build-dir
- src: ~/.config/zsh/sandbox/_sandbox
dest: ~/.local/share/zsh/site-functions/_sandbox
- src: ~/.config/zsh/layout/_layout
dest: ~/.local/share/zsh/site-functions/_layout
- src: ~/.config/zsh/notes/_note
dest: ~/.local/share/zsh/site-functions/_note
- src: ~/.config/zsh/cmake-uninstall
dest: ~/.local/bin/cmake-uninstall
- src: ~/.config/zsh/$
dest: ~/.local/bin/$
- src: ~/.config/zsh/url/url
dest: ~/.local/bin/url
- src: ~/.config/zsh/url/_url
dest: ~/.local/share/zsh/site-functions/_url
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 - name: get absolute path
shell: command -v zsh shell: command -v zsh