12 Commits

43 changed files with 220 additions and 310 deletions

View File

@@ -1,154 +0,0 @@
#!/usr/bin/python
# Copyright: (c) 2018, Terry Jones <terry.jones@example.org>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
from typing import Dict, List
__metaclass__ = type
DOCUMENTATION = r'''
---
module: my_test
short_description: This is my test module
# If this is part of a collection, you need to use semantic versioning,
# i.e. the version is of the form "2.5.0" and not "2.4".
version_added: "1.0.0"
description: This is my longer description explaining my test module.
options:
name:
description: This is the message to send to the test module.
required: true
type: str
new:
description:
- Control to demo if the result of this module is changed or not.
- Parameter description can be a list as well.
required: false
type: bool
# Specify this value according to your collection
# in format of namespace.collection.doc_fragment_name
# extends_documentation_fragment:
# - my_namespace.my_collection.my_doc_fragment_name
author:
- Your Name (@yourGitHubHandle)
'''
EXAMPLES = r'''
# Pass in a message
- name: Test with a message
my_namespace.my_collection.my_test:
name: hello world
# pass in a message and have changed true
- name: Test with a message and changed output
my_namespace.my_collection.my_test:
name: hello world
new: true
# fail the module
- name: Test failure of the module
my_namespace.my_collection.my_test:
name: fail me
'''
RETURN = r'''
# These are examples of possible return values, and in general should use other names for return values.
original_message:
description: The original name param that was passed in.
type: str
returned: always
sample: 'hello world'
message:
description: The output message that the test module generates.
type: str
returned: always
sample: 'goodbye'
'''
from ansible.module_utils.basic import AnsibleModule, subprocess
def run_module():
# define available arguments/parameters a user can pass to the module
module_args = dict(
keybindings=dict(type='list', require=True),
)
# seed the result dict in the object
# we primarily care about changed and state
# changed is if this module effectively modified the target
# state will include any data that you want your module to pass back
# for consumption, for example, in a subsequent task
result = dict(
changed=False,
original_message='',
message=''
)
# the AnsibleModule object will be our abstraction working with Ansible
# this includes instantiation, a couple of common attr would be the
# args/params passed to the execution, as well as if the module
# supports check mode
module = AnsibleModule(
argument_spec=module_args,
supports_check_mode=True
)
# if the user is working with this module in only check mode we do not
# want to make any changes to the environment, just return the current
# state with no modifications
if module.check_mode:
module.exit_json(**result)
# manipulate or modify the state as needed (this is going to be the
# part where your module will do what it needs to do)
keys = []
for index, keybinding in enumerate(module.params["keybindings"]):
key = f"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom{index}"
for value in ["binding", "command", "name"]:
subprocess.check_call(
["dconf", "write", f"/{key}{value}", f"'{keybinding[value]}'"]
)
keys.append(key)
subprocess.check_call(
[
"dconf",
"write",
"/org/gnome/settings-daemon/plugins/media-keys",
f"['{"', '".join(keys)}']",
]
)
# result['original_message'] = str(keybinding_entries)
# result["message"] = str(custom_keybindings)
# use whatever logic you need to determine whether or not this module
# made any modifications to your target
# if module.params['new']:
result['changed'] = True
# during the execution of the module, if there is an exception or a
# conditional state that effectively causes a failure, run
# AnsibleModule.fail_json() to pass in the message and the result
# if module.params['name'] == 'fail me':
# module.fail_json(msg='You requested this to fail', **result)
# in the event of a successful module execution, you will want to
# simple AnsibleModule.exit_json(), passing the key/value results
module.exit_json(**result)
def main():
run_module()
if __name__ == '__main__':
main()

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,6 +40,7 @@
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

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

@@ -13,26 +13,18 @@
# NOTE: Use this command to inspect the current state of the custom keybindings # NOTE: Use this command to inspect the current state of the custom keybindings
# dconf dump / | sed -n '/\[org.gnome.settings-daemon.plugins.media-keys/,/^$/p' # dconf dump / | sed -n '/\[org.gnome.settings-daemon.plugins.media-keys/,/^$/p'
- set_fact:
custom_keybindings:
# TODO: 1Password Quick Access
# [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0]
# binding='<Shift><Alt>space'
# command='1password --quick-access'
# name='1Password Quick Access'
- binding: <Shift><Alt>space
command: 1password --quick-access
name: 1Password Quick Access
# TODO: Guake toggle - this requires removing a default binding
# [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1]
# binding='<Super>space'
# command='guake-toggle'
# name='Guake Toggle'
- binding: <Super>space
command: guake-toggle
name: Guake Toggle
# TODO: List of custom-keybindings # TODO: List of custom-keybindings
# [org/gnome/settings-daemon/plugins/media-keys] # [org/gnome/settings-daemon/plugins/media-keys]
# custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/'] # custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/']
# TODO: 1Password Quick Access
# [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0]
# binding='<Shift><Alt>space'
# command='1password --quick-access'
# name='1Password Quick Access'
# TODO: Guake toggle - this requires removing a default binding
# [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1]
# binding='<Super>space'
# command='guake-toggle'
# name='Guake Toggle'

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

@@ -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

@@ -17,7 +17,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
@@ -80,6 +79,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

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