diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f86a1f1 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,109 @@ +# Contributing + +## Package definition + +Package defintions are just `yaml` tasks in the directory +`tasks/pkgs`, which handle how a package is installed. + +Most can be installed using the `syspkgs` list, and are simply +appending the package name to said list based on the system. + +If a package can be installed via an entry to `syspkgs` for some, +but not all platforms, handling is done to either inform the user +that the package is not available, or to append the package name +to another installation method such as: + +- `appimages` to install the appimage of a package +- `cargopkgs` to install via the rust cargo package manager +- `cargoversioned` to install version lockec cargo packages +- `caskpkgs` to install a homebrew cask +- `flatpkgs` to install flatpaks +- `gopkgs` to install using the `go install` command +- `npmpkgs` to install packages from npm +- `pipxpkgs` to install packages from Python pip +- `srcpkgs` to build packages from source +- `tappkgs` to install packages from home brew taps + +Alternative sources of packages can be defined with entries to: + +- `fpremotes` to add a flatpak remote +- `brewtaps` to add a homebrew tap + +### Adding system level repositories + +Many packages exist in their own external repository for the +given system, such as `/etc/yum.repos.d` for RedHat based linux +distros, `/etc/apt/sources.list.d` for Debian based distros and +others. Since you an add the package to `syspkgs` by enabling a +repo, the coresponding task in `tasks/pkgs` should take the +steps needed to enable the repository. + +### Packages with multiple instllation methods + +Many packages can be installed in different ways, like the +`bitwarden` package. `bitwarden` can be installed as a `syspkg` +on some machines, a `caskpkg` on macOS, an `appimage`, a `flatpak` +or even a `snap`. + +For such packages, a default is chosen to install, in the following order +of precedence: `syspkgs`, `flatpkgs`, `snappkgs`, `appimages`. + +In that order, `syspkgs` and `caskpkgs` have equal weight, as it applies +to macOS. + +## Formatting rules + +- Use indentation explicitness. Lists should be indented: + +```yaml +# Good +my_good_list: + - my_list_item + +# Bad +my_bad_list: +- my_list_item +``` + +- Variables should be in snake case, separating words +- Short names are fine if they are explicit. ie `vers` can be used instead of `version` +- If more then one variable starts with the same words, put it into a dict if it makes sense: + +```yaml +# variables that should be a dict +cargo_locked: true +cargo_pkg: alacritty + +# better to just be +cargo: + locked: true + pkg: alacritty +``` +- Tasks **MUST** follow the convention in this example: + +```yaml +- name: Capitalize first letter of name + when: + - each condition has it's own line + - (brackets around conditions with) or + (to show they are separate) + become: "{{ not use_local }}" # must be able to be used with use_local + become_user: # this should not be needed, but always follows become if it is + loop: "{{ my_loopable_list }}" + loop_control: # **MUST** always use at least loop_var for any loop + loop_var: my_item + ansible.builtin.set_fact: # always use the full module name + ... +``` + +- `name`: Every task needs a name, and the first letter must be capitalized +- `when`: If a when clause exists, it follows the name + - Each clause must have it's own line, including and `or` clause, as seen above +- `become`: must follow the when clause if it exists, name otherwise + - Any other `become_` settings follow `become` in alphabetical order +- `loop`: must be defined just before the module invocation + - Every loop needs to rename the `loop_var` to something that makes sense + - `until` is consider the same as `loop` for the purposes of placement +- The last item must be the module invocation, using the fully qualified name + - For example, don't use `set_fact:`, use `ansible.builtin.set_fact:` + diff --git a/README.md b/README.md index e4bf622..8b75507 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -Role Name -========= +# ansible_role_package Manage package installation for a number of packages that sometimes need special handling. Some are built from @@ -11,60 +10,162 @@ special instructions to properly install and use. I decided to simplify the management of those packages by creating a role with special handling. -Included packages: +Order of precedence for package installation: -- Desktop applications: alacritty, firefox, ghostty, kitty, neovide -- Shell applications: btop, carapace, nushell, fzf, jq, neovim, pipx, ripgrep, - stow, tmux, zoxide -- Infrastructure applications: ansible, consul, nomad, packer, terraform -- Development tools: cmake, git, go, nodejs, hugo, rust, tidy -- Misc: editorconfig, hashicorp package repository, nerdfonts, pandoc, - pytho3-pip, terra repository for fedora, zfs -- Cargo packages: dotenv-linter, eza, htmx-lsp, starship -- Go packages: air, buf, checkmake, glow, lazygit, revive, templ, gopls -- NPM packages: ansible-language-server, commitlint-cli, - commitlint-config-conventional, markdownlint-cli, quobix-vacuum, - tailwindcss-languageserver -- Pipx packages: cmakelang, sqlfluff +1. System package manager (dnf, apt, homebrew, etc.) +2. Appimage (Linux only) +3. Flatpak (Linux only) +4. Snap (Linux only), takes precedence over flatpak on Ubuntu based systems +5. Language package manager (`cargo install`, `go install`, `npm install`, etc.) +6. Build and install from source -Requirements ------------- +_This does not configure installed software, just installs it_ + +## Available Packages + +- air +- alacritty +- ansible-language-server +- ansible-lint +- ansible +- bashls +- bat +- bitwarden +- blender +- broot +- btop +- buf +- bufls +- carapace +- cheat +- checkmake +- choose +- clangd +- cmake +- cmakelang +- commitlint-cli +- commitlint-config-conventional +- consul +- cssls +- curlie +- dbeaver +- dockerls +- dotenv-linter +- duf +- dust +- editorconfig +- eslint +- eza +- fd +- firefox +- flatpak +- fzf +- ghostty +- git +- glow +- go +- godot +- gopls +- gping +- heroic +- htmlls +- htmx-lsp +- httpie +- hugo +- hyperfine +- intelephense +- jinja-lsp +- jq +- jsonls +- kitty +- lazygit +- libreoffice +- lua-language-server +- markdownlint-cli +- mcfly +- neovide +- neovim +- nerdfonts +- nextcloud +- nginxls +- nodejs +- nomad +- nushell +- packer +- pandoc +- pgadmin +- pipx +- podman +- pyright +- python3-pip +- quobix-vacuum +- revive +- ripgrep +- rust +- sd +- sqlfluff +- sqlls +- starship +- stow +- tailscale +- tailwindcss-languageserver +- templ +- terra_repo +- terraform +- terraformls +- thunderbird +- tidy +- tldr +- tmux +- vault +- xh +- yamlls +- zfs +- zig +- zls +- zoxide +- zsh + +## Requirements + +- + +## Role Variables + +- `use_local`: Boolean, default `true` + - When `true`, uses the following paths: + - `$HOME/.local` as the install prefix, placing binaries in `$HOME/.local/bin` + - `$HOME/.local/appimage` for saved appimages, which are then linked to `$HOME/.local/bin` + - `$HOME/.local/archive` for extracted archives linking binaries to `$HOME/.local/bin` + - `$HOME/.cache` for caching downloads + - `$HOME/.cargo` for cargo installations, placing binaries in `$HOME/.cargo/bin` + - When `false`, uses the following system wide paths: + - `/usr/local` as the install prefix, placing binaries in `/usr/local/bin` + - `/opt/appimage` for saved appimages, which are then linked to `/usr/local/bin` + - `/opt/archive` for extracted archives, linking binaries to `/usr/local/bin` + - `/opt/cache` for caching downloads + - `/opt/cargo` for rust cargo installations, placing binaries in `/opt/cargo/bin` +- `packages`: List of strings + - List of packages to install from the `Available Packages` list +- `prefer_method`: String, default `system` + - The preferred method of installation an application when multiple options exist + - Valid options are: + - `flatpak` - Flatpak, Linux only + - `langtool` - Using language tools such as `cargo`, `go`, `npm` or `pipx` + - `snap` - Snap, Linux only + - `source` - Prefer building from source. **Not recommended** + - `system` - Default, system package manager (dnf, apt, homebrew, etc.) + +## Dependencies -Role Variables --------------- - -- packages: - - List of packages to install -- assume_missing_is_syspkg: - - Bool. Default `true` - - Handle non-supported packages as package manager packages -- full_upgrade: - - Bool. Default `false` - - Do a full package upgrade first if `true` -- install_state: - - String. Default `present` - - Set to `latest` to update packages - - Set to `absent` to remove packages - - *currently only supports remove package manager installed packages* - - Valid choices: `present`, `latest`, `absent` -- pkgconfig: - - specific configuration for individual packages - -Dependencies ------------- +## Example Playbook -Example Playbook ----------------- - - -License -------- +## License MIT -Author Information ------------------- +## Author Information -- Matthew Stobbs +- Matthew Stobbs diff --git a/handlers/main.yml b/handlers/main.yml index a845a14..a2565ef 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,2 +1,51 @@ +# vim: set filetype=yaml.ansible : --- -# handlers file for ansible_role_package +- name: Depend go + ansible.builtin.include_tasks: + file: addpkg.yml + vars: + pkg: go + +- name: Depend flatpak + vars: + pkg: flatpak + ansible.builtin.include_tasks: + file: addpkg.yml + +- name: Depend node + vars: + pkg: nodejs + ansible.builtin.include_tasks: + file: addpkg.yml + +- name: Depend pipx + vars: + pkg: pipx + ansible.builtin.include_tasks: + file: addpkg.yml + +- name: Depend cargo + vars: + pkg: rust + ansible.builtin.include_tasks: + file: addpkg.yml + +- name: Depend rust + vars: + pkg: rust + ansible.builtin.include_tasks: + file: addpkg.yml + +- name: Depend zig + vars: + pkg: zig + ansible.builtin.include_tasks: + file: addpkg.yml + +- name: Depend terra repo + ansible.builtin.include_tasks: + file: repos/terra.yml + +- name: Depend hashicorp repo + ansible.builtin.include_tasks: + file: repos/hashicorp.yml diff --git a/meta/argument_spec.yml b/meta/argument_spec.yml index 6aa26e5..1b573af 100644 --- a/meta/argument_spec.yml +++ b/meta/argument_spec.yml @@ -1,43 +1,40 @@ --- argument_specs: main: - short_description: install software easily + short_description: Install software using ansible description: - Make the installation of packages consistent on each platform. - - Installs for RedHat, Debian or Darwin based systems. + - Installs for RedHat, Debian and MacOS based systems. author: - Matthew Stobbs options: + use_local: + type: bool + default: true + required: false + description: + Install packages using the current users + `$HOME/.local` directory as the install prefix. + + WHen `false`, uses the system wide `/usr/local` + as the install prefix, and stores other parts + (appimages, extracted archives, cache) in the + appropriate path starting with `/opt`. packages: - type: "list" - elements: "str" + type: list + elements: str required: true description: | The list of packages to install by name. - syspkglist: - type: "list" - elements: "str" + The list must contain only values that exist in + `Available Packages` in `README.md` + prefer_method: + type: str required: false - description: | - Additional packages to install via the system - default package manager. Is combined with the - completed list of packages to install. - Only use this if you a package isn't available to the role. - install_state: - type: "str" + default: system choices: - - "present" - - "latest" - - "absent" - required: false - default: present - description: | - Desired state of the packages to install. - full_upgrade: - type: "bool" - required: false - default: false - description: | - Do a full system upgrade before installing - additional packages. This does not handle - rebooting a machine that has been upgraded. + - flatpak + - langtool + - snap + - source + - system diff --git a/meta/main.yml b/meta/main.yml index 53c5bd6..4e5a550 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -7,20 +7,20 @@ galaxy_info: # issue_tracker_url: http://example.com/issue/tracker license: MIT - min_ansible_version: 3.0 + min_ansible_version: "3.0" platforms: - name: Fedora versions: - all - - 40+ - - name: Enterprise Linux 9 (RHEL, rocky alma) + - "40" + - "41" + - name: EL versions: - - 9.4 - - 9.5 + - "9" - name: macOS version: - - 14.2+ + - ">=14.2" galaxy_tags: - linux @@ -29,5 +29,3 @@ galaxy_info: - software dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. diff --git a/tasks/addpkg.yml b/tasks/addpkg.yml index e1f3ec6..3935707 100644 --- a/tasks/addpkg.yml +++ b/tasks/addpkg.yml @@ -1,23 +1,11 @@ # vim: set filetype=yaml.ansible : --- -- name: "check if task for {{pkg}} exists" - ansible.builtin.command: "test -f {{role_path}}/tasks/pkgs/{{ pkg }}.yml" - register: cpkg_exists - ignore_errors: true - failed_when: not (cpkg_exists.rc != 0 or cpkg_exists.rc != 1) +- name: "Load specialized configuration if it exists for {{ pkg }}" + when: + - pkgconfig[pkg] is defined + ansible.builtin.include_tasks: + file: "config/{{ pkg }}.yml" -- name: "add include task for {{pkg}}" +- name: "Add include task for {{ pkg }}" ansible.builtin.include_tasks: file: "pkgs/{{ pkg }}.yml" - when: cpkg_exists.rc == 0 - tags: - - packages - -- name: "add {{pkg}} to syspkgs if task doesn't exist: {{assume_missing_is_syspkg}}" - ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [pkg] }}" - when: - - cpkg_exists.rc != 0 - - assume_missing_is_syspkg - tags: - - packages diff --git a/tasks/appimage.yml b/tasks/appimage.yml new file mode 100644 index 0000000..9a81d8d --- /dev/null +++ b/tasks/appimage.yml @@ -0,0 +1,26 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Install appimage {{ pkg }} + become: "{{ ext_become }}" + block: + - name: Ensure appimage path exists + ansible.builtin.file: + path: "{{ path.appimage }}/{{ pkg.link_name }}" + mode: '0755' + state: directory + + - name: Fetch appimage + become: "{{ ext_become }}" + ansible.builtin.get_url: + mode: '0755' + decompress: false + backup: true + url: "{{ pkg.url }}" + dest: "{{ path.appimage }}/{{ pkg.link_name }}/{{ pkg.file }}" + + - name: Link appimage to bin + become: "{{ ext_become }}" + ansible.builtin.file: + state: link + src: "{{ path.appimage }}/{{ pkg.link_name }}/{{ pkg.file }}" + path: "{{ path.bindir }}/{{ pkg.link_name }}" diff --git a/tasks/appimage/neovim.yml b/tasks/appimage/neovim.yml new file mode 100644 index 0000000..4b6b623 --- /dev/null +++ b/tasks/appimage/neovim.yml @@ -0,0 +1,29 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Install neovim appimage + become: true + block: + - name: Create install dir + ansible.builin.file: + state: directory + mode: "0755" + path: "{{ nvim.instdir }}" + owner: "{{ pkgconfig_neovim.owner }}" + group: "{{ pkgconfig_neovim.group }}" + + - name: Get neovim appimage + ansible.builtin.get_url: + mode: "0755" + decompress: false + backup: true + url: "{{ pkgconfig_neovim.appimage_url_pfx }}/{{ pkgconfig_neovim.version }}/nvim.appimage" + checksum: "sha256:{{ pkgconfig_neovim.appimage_url_pfx }}/{{ pkgconfig_neovim.version }}/nvim.appimage.sha256sum" + dest: "{{ pkgconfig_neovim.install_dir }}/nvim.appimage.{{ pkgconfig_neovim.version }}" + owner: "{{ pkgconfig_neovim.owner }}" + group: "{{ pkgconfig_neovim.group }}" + + - name: Link neovim appimage + ansible.builtin.file: + state: link + src: "{{ pkgconfig_neovim.install_dir }}/nvim.appimage.{{ pkgconfig_neovim.version }}" + path: "{{ pkgconfig_neovim.install_prefix }}/bin/nvim" diff --git a/tasks/archive/go.yml b/tasks/archive/go.yml new file mode 100644 index 0000000..f7b53dc --- /dev/null +++ b/tasks/archive/go.yml @@ -0,0 +1,42 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Check if go is already installed + ansible.builtin.stat: + path: "{{ path.go }}/VERSION" + register: stat_path_go + +- name: Check version of installed go + when: + - stat_path_go.stat.exists + ansible.builtin.set_fact: + do_go_install: "{{ not (go.vers in lookup('ansible.builtin.file', path.go ~ '/VERSION')) }}" + +- name: Install/update go + when: + - (do_go_install is defined and do_go_install) or + not stat_path_go.stat.exists + block: + - name: Download go archive + register: get_url_go + ansible.builtin.get_url: + dest: "{{ d_tempdir.path }}/{{ go.archive }}" + url: "{{ go.base_url }}/{{ go.archive }}" + checksum: "{{ go.sum }}" + decompress: false + mode: '0644' + + - name: Extract go package for Linux + become: "{{ ext_become }}" + when: + - ansible_system == 'Linux' + ansible.builtin.unarchive: + dest: "{{ go.prefix }}" + src: "{{ d_tempdir.path }}/{{ go.archive }}" + remote_src: true + + - name: Install go macOS using pkg file + become: true + when: + - ansible_distribution == 'MacOSX' + ansible.builtin.command: + cmd: "installer -pkg {{ d_tempdir.path }}/{{ go.archive }} -target {{ go.prefix }}" diff --git a/tasks/archive/luals.yml b/tasks/archive/luals.yml new file mode 100644 index 0000000..b0af1f5 --- /dev/null +++ b/tasks/archive/luals.yml @@ -0,0 +1,36 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Create temp path + register: d_luals_dl_tmp + ansible.builtin.tempfile: + state: directory + prefix: luals_dl. + +- name: Get latest lua-language-server + become: "{{ ext_become }}" + ansible.builtin.get_url: + dest: "{{ d_luals_dl_tmp.path }}/{{ luals_vars.archive }}" + url: "{{ luals_vars.url }}/{{ luals_vars.archive }}" + mode: "0644" + decompress: false + +- name: Create install_path + become: "{{ ext_become }}" + ansible.builtin.file: + state: directory + path: "{{ path.archive }}/luals" + mode: "0755" + +- name: Extract lua language server archive + become: "{{ ext_become }}" + ansible.builtin.unarchive: + dest: "{{ path.archive }}/luals" + src: "{{ d_luals_dl_tmp.path }}/{{ luals_vars.archive }}" + remote_src: true + +- name: Link lua language server binary + become: "{{ ext_become }}" + ansible.builtin.file: + state: link + src: "{{ path.bin }}/lua-language-server" + path: "{{ path.archive }}/luals/bin/lua-language-server" diff --git a/tasks/archive/nerdfonts.yml b/tasks/archive/nerdfonts.yml new file mode 100644 index 0000000..b24e9f5 --- /dev/null +++ b/tasks/archive/nerdfonts.yml @@ -0,0 +1,29 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Linux installation + when: ansible_system == 'Linux' + block: + - name: Create nerdfonts directories + become: "{{ ext_become }}" + loop: "{{ nerdfonts.fonts }}" + loop_control: + loop_var: font + register: nerdfont_result + ansible.builtin.file: + path: "{{ path.prefix }}/{{ nerdfonts.path }}/{{ font }}" + state: directory + mode: '0755' + + - name: Download and extract nerdfonts + when: + - nerdfont_result is changed or + nerdfonts.force_install + become: "{{ ext_become }}" + loop: "{{ nerdfonts.fonts }}" + loop_control: + loop_var: font + ansible.builtin.unarchive: + creates: "{{ path.prefix }}/{{ nerdfonts.path }}/{{ font }}/README.md" + src: "{{ nerdfonts.base_url }}/{{ font }}.tar.xz" + dest: "{{ path.prefix }}/{{ nerdfonts.path }}/{{ font }}" + remote_src: true diff --git a/tasks/archive/zig.yml b/tasks/archive/zig.yml new file mode 100644 index 0000000..0a6ac82 --- /dev/null +++ b/tasks/archive/zig.yml @@ -0,0 +1,38 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Check if zig exists + ansible.builtin.stat: + path: "{{ path.archive }}/zig/{{ zig.path }}/zig" + register: r_zig_stat + +- name: Update/install zig + when: + - not r_zig_stat.stat.exists + block: + - name: Download zig archive + ansible.builtin.get_url: + dest: "{{ d_tempdir.path }}/{{ zig.pkg }}" + url: "{{ zig.base_url }}/{{ zig.vers }}/{{ zig.pkg }}" + decompress: false + mode: '0644' + + - name: Create zig archive dir + become: "{{ ext_become }}" + ansible.builtin.file: + state: directory + mode: '0755' + path: "{{ path.archive }}/zig" + + - name: Extract zig package + become: "{{ ext_become }}" + ansible.builtin.unarchive: + dest: "{{ path.archive }}/zig" + src: "{{ d_tempdir.path }}/{{ zig.pkg }}" + remote_src: true + + - name: Link zig binary + become: "{{ ext_become }}" + ansible.builtin.file: + state: link + src: "{{ path.archive }}/zig/{{ zig.path }}/zig" + path: "{{ path.bin }}/zig" diff --git a/tasks/archive/zls.yml b/tasks/archive/zls.yml new file mode 100644 index 0000000..17e0189 --- /dev/null +++ b/tasks/archive/zls.yml @@ -0,0 +1,37 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Check if zls exists + ansible.builtin.stat: + path: "{{ path.archive }}/zls/{{ zls.path }}/zls" + register: r_zls_stat + +- name: Update/install zls + block: + - name: Download zls archive + register: get_url_zls + ansible.builtin.get_url: + dest: "{{ d_tempdir.path }}/{{ zls.pkg }}" + url: "{{ zls.base_url }}/{{ zls.pkg }}" + decompress: false + mode: '0644' + + - name: Create zls archive dir + become: "{{ ext_become }}" + ansible.builtin.file: + state: directory + mode: '0755' + path: "{{ path.archive }}/zls/{{ zls.path }}" + + - name: Extract zls package + become: "{{ ext_become }}" + ansible.builtin.unarchive: + dest: "{{ path.archive }}/zls/{{ zls.path }}" + src: "{{ d_tempdir.path }}/{{ zls.pkg }}" + remote_src: true + + - name: Link zls binary + become: "{{ ext_become }}" + ansible.builtin.file: + state: link + src: "{{ path.archive }}/zls/{{ zls.path }}/zls" + path: "{{ path.bin }}/zls" diff --git a/tasks/build/alacritty.yml b/tasks/build/alacritty.yml deleted file mode 100644 index da5c775..0000000 --- a/tasks/build/alacritty.yml +++ /dev/null @@ -1,14 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -- name: build and install alacritty - ansible.builtin.command: - cmd: - - cargo - - install - - --root - - "{{ pkgconfig_alacritty.install_prefix }}" - - --git - - "{{ pkgconfig_alacritty.git_repo }}" - - --tag - - "v{{ pkgconfig_alacritty.version }}" - become: true diff --git a/tasks/build/bitwarden.yml b/tasks/build/bitwarden.yml deleted file mode 100644 index 293ce3a..0000000 --- a/tasks/build/bitwarden.yml +++ /dev/null @@ -1,28 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -- name: Install bitwarden appimage - blocK: - - ansible.builtin.file: - state: directory - mode: '0755' - path: "{{ pkgconfig_bitwarden.install_dir }}" - owner: "{{ pkgconfig_bitwarden.owner }}" - group: "{{ pkgconfig_bitwarden.group }}" - - - ansible.builtin.get_url: - mode: '0755' - decompress: false - backup: true - url: "https://vault.bitwarden.com/download/?app=desktop&platform=linux&variant=appimage" - dset: "{{ pkgconfig_bitwarden.install_dir }}/bitwarden.appimage" - owner: "{{ pkgconfig_bitwarden.owner }}" - group: "{{ pkgconfig_bitwarden.group }}" - - - ansible.builtin.file: - state: link - src: "{{ pkgconfig_bitwarden.install_dir }}/bitwarden.appimage" - path: "{{ pkgconfig_bitwarden.install_prefix }}/bin/bitwarden" - when: - - pkgconfig_bitwarden.use_appimage - beocome: "{{ pkgconfig_bitwarden.dobecome }}" - become_user: "{% if pkgconfig_bitwarden.dobecome %}{{ pkgconfig_bitwarden.owner }}{% else %}~{% endif %}" diff --git a/tasks/build/ghostty.yml b/tasks/build/ghostty.yml deleted file mode 100644 index c417bed..0000000 --- a/tasks/build/ghostty.yml +++ /dev/null @@ -1,33 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -- name: build ghostty from source - block: - - name: create temp path - ansible.builtin.tempfile: - state: directory - prefix: ghostty. - register: d_ghostty_tmp - - - name: clone ghostty git repository - ansible.builtin.git: - depth: 1 - dest: "{{ d_ghostty_tmp.path }}/ghostty" - repo: "{{ pkgconfig_ghostty.git_repo }}" - version: "{{ pkgconfig_ghostty.version }}" - - - name: build ghostty - ansible.builtin.command: - chdir: "{{ d_ghostty_tmp.path }}/ghostty" - cmd: "zig build -D{{ pkgconfig_ghostty.optimize }}" - register: c_ghostty_build - - - name: install ghostty - ansible.file.copy: - src: "{{ d_ghostty_tmp.path }}/ghostty/zig-out/bin/ghostty" - dest: "{{ pkgconfig_ghostty.install_prefix }}/bin/ghostty" - owner: "{{ pkgconfig_ghostty.owner }}" - group: "{{ pkgconfig_ghostty.group }}" - mode: "0755" - remote_src: true - become: "{{ pkgconfig_ghostty.become }}" - become_user: "{% if pkgconfig_ghostty.become %}{{ pkgconfig_ghostty.owner }}{% else %}~{% endif %}" diff --git a/tasks/build/go.yml b/tasks/build/go.yml deleted file mode 100644 index 598837e..0000000 --- a/tasks/build/go.yml +++ /dev/null @@ -1,52 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -- name: check go version - ansible.builtin.command: - cmd: "go version" - register: r_go_version - ignore_errors: true - -- name: install/update go - block: - - name: set go arch - ansible.builtin.set_fact: - arch: "{{ pkgconfig_go.archmap[ansible_architecture] }}" - - - name: set go archive filename - ansible.builtin.set_fact: - go_archive: "go{{ pkgconfig_go.version }}.{{ ansible_system | lower }}-{{ arch }}.{{ pkgconfig_go.extmap[ansible_system] }}" - - - name: create temp path - ansible.builtin.tempfile: - state: directory - prefix: go_dl. - register: d_go_dl_tmp - - - name: download go archive - become: true - ansible.builtin.get_url: - dest: "{{ d_go_dl_tmp.path }}/{{ go_archive }}" - url: "https://go.dev/dl/{{ go_archive }}" - checksum: "{{ pkgconfig_go.sums[pkgconfig_go.version][ansible_system][arch] }}" - decompress: false - - - name: ensure go install dir exists - become: true - ansible.builtin.file: - path: "{{ pkgconfig_go.install_path }}" - state: directory - - - name: extract go package - ansible.builtin.unarchive: - dest: "{{ pkgconfig_go.install_path }}" - src: "{{ d_go_dl_tmp.path }}/{{ go_archive }}" - remote_src: true - when: ansible_system == 'Linux' - become: true - - - name: install go macOS use pkg file - ansible.builtin.command: - cmd: "installer -pkg {{ d_go_dl_tmp.path }}/{{ go_archive }} -target /" - when: ansible_system == 'Darwin' - become: true - when: pkgconfig_go.version not in r_go_version.stdout diff --git a/tasks/build/lua-language-server.yml b/tasks/build/lua-language-server.yml deleted file mode 100644 index a6a0409..0000000 --- a/tasks/build/lua-language-server.yml +++ /dev/null @@ -1,47 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -- name: Set needed variables lua language server - ansible.builtin.set_fact: - luals_pkg: "lua-language-server-{{ pkgconfig_luals.version }}-{{ pkgconfig_luals.sysmap[ansible_system] }}-{{ pkgconfig_luals.archmap[ansible_architecture] }}.tar.gz" - -- name: Check if lua language server is already installed - ansible.builtin.stat: - path: "{{ pkgconfig_luals.install_path }}/bin/lua-language-server" - register: r_luals_stat - -- name: Install lua-language-server - when: not r_luals_stat.stat.exists - block: - - name: Create temp path - ansible.builtin.tempfile: - state: directory - prefix: luals_dl. - register: d_luals_dl_tmp - - - name: Get latest lua-language-server - ansible.builtin.get_url: - dest: "{{ d_luals_dl_tmp.path }}/{{ luals_pkg }}" - url: "{{ pkgconfig_luals.base_url }}/{{ pkgconfig_luals.version }}/{{ luals_pkg }}" - mode: "0644" - decompress: false - - - name: Create install_path - ansible.builtin.file: - state: directory - path: "{{ pkgconfig_luals.install_path }}" - mode: "0755" - become: true - - - name: Extract lua language server archive - ansible.builtin.unarchive: - dest: "{{ pkgconfig_luals.install_path }}" - src: "{{ d_luals_dl_tmp.path }}/{{ luals_pkg }}" - remote_src: true - become: true - - - name: Link lua language server binary - ansible.builtin.file: - state: link - src: "{{ pkgconfig_luals.install_path }}/bin/lua-language-server" - path: "{{ pkgconfig_luals.install_prefix }}/bin/lua-language-server" - become: true diff --git a/tasks/build/neovim.yml b/tasks/build/neovim.yml deleted file mode 100644 index 2886bb7..0000000 --- a/tasks/build/neovim.yml +++ /dev/null @@ -1,55 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -- name: build neovim from source - block: - - name: create temp path - ansible.builtin.tempfile: - state: directory - prefix: nvim. - register: d_nvim_tmp - - - name: clone neovim git repository - ansible.builtin.git: - depth: 1 - dest: "{{ d_nvim_tmp.path }}/neovim" - repo: "{{ pkgconfig_neovim.git_repo }}" - version: "{{ pkgconfig_neovim.version }}" - - - name: build and install neovim - ansible.builtin.make: - chdir: "{{ d_nvim_tmp.path }}/neovim" - params: - CMAKE_BUILD_TYPE: "{{ pkgconfig_neovim.build_type }}" - CMAKE_INSTALL_PREFIX: "{{ pkgconfig_neovim.install_prefix }}" - target: install - become: "{{ pkgconfig_neovim.dobecome }}" - become_user: "{% if pkgconfig_neovim.dobecome %}{{ pkgconfig_neovim.owner }}{% else %}~{% endif %}" - when: not pkgconfig_neovim.use_appimage - -- name: install neovim appimage - block: - - ansible.builin.file: - state: directory - mode: "0755" - path: "{{ pkgconfig_neovim.install_dir }}" - owner: "{{ pkgconfig_neovim.owner }}" - group: "{{ pkgconfig_neovim.group }}" - - - ansible.builtin.get_url: - mode: "0755" - decompress: false - backup: true - url: "{{ pkgconfig_neovim.appimage_url_pfx }}/{{ pkgconfig_neovim.version }}/nvim.appimage" - checksum: "sha256:{{ pkgconfig_neovim.appimage_url_pfx }}/{{ pkgconfig_neovim.version }}/nvim.appimage.sha256sum" - dest: "{{ pkgconfig_neovim.install_dir }}/nvim.appimage.{{ pkgconfig_neovim.version }}" - owner: "{{ pkgconfig_neovim.owner }}" - group: "{{ pkgconfig_neovim.group }}" - - - ansible.builtin.file: - state: link - src: "{{ pkgconfig_neovim.install_dir }}/nvim.appimage.{{ pkgconfig_neovim.version }}" - path: "{{ pkgconfig_neovim.install_prefix }}/bin/nvim" - when: - - pkgconfig_neovim.use_appimage - become: "{{ pkgconfig_neovim.dobecome }}" - become_user: "{% if pkgconfig_neovim.dobecome %}{{ pkgconfig_neovim.owner }}{% else %}~{% endif %}" diff --git a/tasks/build/nerdfonts.yml b/tasks/build/nerdfonts.yml deleted file mode 100644 index 546c88d..0000000 --- a/tasks/build/nerdfonts.yml +++ /dev/null @@ -1,37 +0,0 @@ -# vim: set filetype=yaml.ansible : -# Install nerdfonts for each platform ---- -- name: linux installation - when: ansible_system == 'Linux' - block: - - name: set install path for non-system installs - ansible.builtin.set_fact: - nerdfonts_install_path: "{{ lookup('ansible.builtin.env', 'HOME') }}/.local/share/fonts" - when: not pkgconfig_nerdfonts.system_install - - - name: set install path for system wide installs - ansible.builtin.set_fact: - nerdfonts_install_path: "/usr/local/share/fonts" - when: pkgconfig_nerdfonts.system_install - - - name: create nerdfonts directories - ansible.builtin.file: - path: "{{ nerdfonts_install_path }}/{{ font }}" - state: directory - become: "{{ pkgconfig_nerdfonts.system_install }}" - loop: "{{ pkgconfig_nerdfonts.install }}" - loop_control: - loop_var: font - register: nerdfont_result - - - name: Download and extract nerdfonts - ansible.builtin.unarchive: - creates: "{{ nerdfonts_install_path }}/{{ font }}/README.md" - src: "{{ pkgconfig_nerdfonts.base_url }}/{{ font }}.tar.xz" - dest: "{{ nerdfonts_install_path }}/{{ font }}" - remote_src: true - when: nerdfont_result is changed - become: "{{ pkgconfig_nerdfonts.system_install }}" - loop: "{{ pkgconfig_nerdfonts.install }}" - loop_control: - loop_var: font diff --git a/tasks/build/nushell.yml b/tasks/build/nushell.yml deleted file mode 100644 index 94b1828..0000000 --- a/tasks/build/nushell.yml +++ /dev/null @@ -1,19 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -- ansible.builtin.include_vars: - file: nushell.yml - name: _nushell - -- name: install nushell via cargo - become: true - ansible.builtin.command: - cmd: - - cargo - - install - - --root - - "{{ _nushell.install_prefix }}" - - "{{ nuitem }}" - - --locked - loop_control: - loop_var: nuitem - loop: "{{ _nushell.nu_pkgs_list }}" diff --git a/tasks/build/zig.yml b/tasks/build/zig.yml deleted file mode 100644 index 662574e..0000000 --- a/tasks/build/zig.yml +++ /dev/null @@ -1,46 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -- name: download zig archive - ansible.builtin.set_fact: - zig_path: "zig-{{ pkgconfig_zig.sysmap[ansible_system] }}-{{ pkgconfig_zig.archmap[ansible_architecture] }}-{{ pkgconfig_zig.version }}" - zig_pkg: "zig-{{ pkgconfig_zig.sysmap[ansible_system] }}-{{ pkgconfig_zig.archmap[ansible_architecture] }}-{{ pkgconfig_zig.version }}.tar.xz" - -- name: check if zig {{ pkgconfig_zig.version }} exists - ansible.builtin.stat: - path: "{{ pkgconfig_zig.install_path }}/{{ zig_path }}/zig" - register: r_zig_stat - -- name: update/install zig - block: - - name: create temp path - ansible.builtin.tempfile: - state: directory - prefix: zig_dl. - register: d_zig_dl_tmp - - - name: download zig archive - ansible.builtin.get_url: - dest: "{{ d_zig_dl_tmp.path }}/{{ zig_pkg }}" - url: "{{ pkgconfig_zig.base_url }}/{{ pkgconfig_zig.version }}/{{ zig_pkg }}" - decompress: false - - - name: create install_path - ansible.builtin.file: - state: directory - path: "{{ pkgconfig_zig.install_path }}" - become: true - - - name: extract zig package - ansible.builtin.unarchive: - dest: "{{ pkgconfig_zig.install_path }}" - src: "{{ d_zig_dl_tmp.path }}/{{ zig_pkg }}" - remote_src: true - become: true - - - name: link zig binary - ansible.builtin.file: - state: link - src: "{{ pkgconfig_zig.install_path }}/{{ zig_path }}/zig" - path: "{{ pkgconfig_zig.install_prefix }}/bin/zig" - become: true - when: not r_zig_stat.stat.exists diff --git a/tasks/build/zls.yml b/tasks/build/zls.yml deleted file mode 100644 index 300975f..0000000 --- a/tasks/build/zls.yml +++ /dev/null @@ -1,46 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -- name: download zls archive - ansible.builtin.set_fact: - zls_path: "zls-{{ pkgconfig_zls.sysmap[ansible_system] }}-{{ pkgconfig_zls.archmap[ansible_architecture] }}-{{ pkgconfig_zls.version }}" - zls_pkg: "zls-{{ pkgconfig_zls.sysmap[ansible_system] }}-{{ pkgconfig_zls.archmap[ansible_architecture] }}-{{ pkgconfig_zls.version }}.tar.xz" - -- name: check if zls {{ pkgconfig_zls.version }} exists - ansible.builtin.stat: - path: "{{ pkgconfig_zls.install_path }}/{{ zls_path }}/zls" - register: r_zls_stat - -- name: update/install zls - block: - - name: create temp path - ansible.builtin.tempfile: - state: directory - prefix: zls_dl. - register: d_zls_dl_tmp - - - name: download zls archive - ansible.builtin.get_url: - dest: "{{ d_zls_dl_tmp.path }}/{{ zls_pkg }}" - url: "{{ pkgconfig_zls.base_url }}/{{ zls_pkg }}" - decompress: false - - - name: create install_path - ansible.builtin.file: - state: directory - path: "{{ pkgconfig_zls.install_path }}/{{ zls_path }}" - become: true - - - name: extract zls package - ansible.builtin.unarchive: - dest: "{{ pkgconfig_zls.install_path }}/{{ zls_path }}" - src: "{{ d_zls_dl_tmp.path }}/{{ zls_pkg }}" - remote_src: true - become: true - - - name: link zls binary - ansible.builtin.file: - state: link - src: "{{ pkgconfig_zls.install_path }}/{{ zls_path }}/zls" - path: "{{ pkgconfig_zls.install_prefix }}/bin/zls" - become: true - when: not r_zls_stat.stat.exists diff --git a/tasks/cargo.yml b/tasks/cargo.yml new file mode 100644 index 0000000..508bf72 --- /dev/null +++ b/tasks/cargo.yml @@ -0,0 +1,9 @@ +# vim: set filetype=yaml.ansible +--- +- name: Install cargo {{ pkg }} + become: "{{ ext_become }}" + community.general.cargo: + name: "{{ pkg.name | default(pkg) }}" + version: "{{ pkg.vers | default(omit) }}" + path: "{{ paths.cargo | default(omit) }}" + locked: "{{ pkg.locked | default(true) }}" diff --git a/tasks/config/alacritty.yml b/tasks/config/alacritty.yml new file mode 100644 index 0000000..5a26957 --- /dev/null +++ b/tasks/config/alacritty.yml @@ -0,0 +1,10 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Set alacritty configuration + ansible.builtin.set_fact: + alacritty: + deps: "{{ pkgconfig.alacritty[ansible_os_family].build_deps }}" + vers: "{{ pkgconfig.alacritty.version }}" + cask: "{{ pkgconfig.alacritty.cask | default(omit) }}" + locked: true + name: alacritty diff --git a/tasks/config/bitwarden.yml b/tasks/config/bitwarden.yml new file mode 100644 index 0000000..a1f82c2 --- /dev/null +++ b/tasks/config/bitwarden.yml @@ -0,0 +1,22 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Set bitwarden install method + ansible.builtin.set_fact: + bitwarden: + method: "{{ pkgconfig.bitwarden.method[ansible_distribution] | default('flatpak') }}" + +- name: Set bitwarden config + ansible.builtin.set_fact: + bitwarden: + pkg: "{{ pkgconfig.bitwarden[bitwarden.method] }}" + method: "{{ bitwarden.method }}" + +- name: Set bitwarden config for appimage install + when: + - bitwarden.method == 'appimage' + ansible.builtin.set_fact: + bitwarden: + method: appimage + file: "{{ pkgconfig.bitwarden.appimage.name }}" + link_name: "{{ pkgconfig.bitwarden.appimage.link_name }}" + url: "{{ pkgconfig.bitwarden.appimage.url }}" diff --git a/tasks/config/broot.yml b/tasks/config/broot.yml new file mode 100644 index 0000000..89c6f1f --- /dev/null +++ b/tasks/config/broot.yml @@ -0,0 +1,8 @@ +--- +- name: Set broot config + ansible.builtin.set_fact: + broot: + vers: "{{ pkgconfig.broot.version }}" + name: broot + locked: true + deps: "{{ pkgconfig.broot.build_deps[ansible_os_family] }}" diff --git a/tasks/config/carapace.yml b/tasks/config/carapace.yml new file mode 100644 index 0000000..1263a5f --- /dev/null +++ b/tasks/config/carapace.yml @@ -0,0 +1,7 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Set carapace config + ansible.builtin.set_fact: + carapace: + pkgs: "{{ pkgconfig.carapace.pkgs[ansible_system] }}" + repo: "{{ pkgconfig.carapace.repo[ansible_os_family] }}" diff --git a/tasks/config/choose.yml b/tasks/config/choose.yml new file mode 100644 index 0000000..bdca115 --- /dev/null +++ b/tasks/config/choose.yml @@ -0,0 +1,7 @@ +--- +- name: Set choose config + ansible.builtin.set_fact: + choose: + name: choose + vers: "{{ pkgconfig.choose.version }}" + locked: true diff --git a/tasks/config/clangd.yml b/tasks/config/clangd.yml new file mode 100644 index 0000000..eacd9b9 --- /dev/null +++ b/tasks/config/clangd.yml @@ -0,0 +1,4 @@ +- name: Set clangd config + ansible.builtin.set_fact: + clangd: + pkgs: "{{ pkgconfig.clangd.pkgs[ansible_os_family] }}" diff --git a/tasks/config/consul.yml b/tasks/config/consul.yml new file mode 100644 index 0000000..379cc81 --- /dev/null +++ b/tasks/config/consul.yml @@ -0,0 +1,4 @@ +- name: Set configuration for consul + ansible.builtin.set_fact: + consul: + pkgs: "{{ pkgconfig.consul.pkgs[ansible_system] }}" diff --git a/tasks/config/fd.yml b/tasks/config/fd.yml new file mode 100644 index 0000000..dca7e72 --- /dev/null +++ b/tasks/config/fd.yml @@ -0,0 +1,4 @@ +- name: Set fd config + ansible.builtin.set_fact: + fd: + pkgs: "{{ pkgconfig.fd.pkgs[ansible_system] }}" diff --git a/tasks/config/ghostty.yml b/tasks/config/ghostty.yml new file mode 100644 index 0000000..6f4c4e1 --- /dev/null +++ b/tasks/config/ghostty.yml @@ -0,0 +1,25 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Set ghostty install method + ansible.builtin.set_fact: + ghostty: + method: "{{ pkgconfig.ghostty.methods[ansible_distribution] | default(pkgconfig.ghostty.methods.default) }}" + +- name: Set ghostty config + ansible.builtin.set_fact: + ghostty: + method: "{{ ghostty.method }}" + arch: "{{ pkgconfig.ghostty.archmap[ansible_architecture] }}" + deps: "{{ pkgconfig.ghostty.build_deps[ansible_os_family] }}" + vers: "{{ pkgconfig.ghostty.version }}" + pkg: "{{ pkgconfig.ghostty[ghostty.method] }}" + +- name: Set ghostty config for appimage install + when: + - ghostty.method == 'appimage' + ansible.builtin.set_fact: + ghostty: + method: "{{ ghostty.method }}" + file: "Ghostty-{{ ghostty.vers }}-{{ ghostty.arch }}.AppImage" + link_name: "{{ pkgconfig.ghostty.appimage.link_name }}" + url: "{{ pkgconfig.ghostty.appimage.base_url }}/v{{ ghostty.vers }}/Ghostty-{{ ghostty.vers }}-{{ ghostty.arch }}.AppImage" diff --git a/tasks/config/git.yml b/tasks/config/git.yml new file mode 100644 index 0000000..174d937 --- /dev/null +++ b/tasks/config/git.yml @@ -0,0 +1,6 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Set git config + ansible.builtin.set_fact: + git: + pkgs: "{{ pkgconfig.git.pkgs[ansible_system] }}" diff --git a/tasks/config/go.yml b/tasks/config/go.yml new file mode 100644 index 0000000..6be7b4e --- /dev/null +++ b/tasks/config/go.yml @@ -0,0 +1,23 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Set go configuration + ansible.builtin.set_fact: + go: + method: archive + arch: "{{ pkgconfig.go.archmap[ansible_architecture] }}" + ext: "{{ pkgconfig.go.extmap[ansible_system] }}" + sys: "{{ ansible_system | lower }}" + vers: "{{ pkgconfig.go.version }}" + +- name: Set go composite facts + ansible.builtin.set_fact: + go: + method: archive + arch: "{{ go.arch }}" + archive: "go{{ go.vers }}.{{ go.sys }}-{{ go.arch }}.{{ pkgconfig.go.extmap[ansible_system] }}" + ext: "{{ go.ext }}" + prefix: "{% if ansible_distribution == 'MacOSX' %}/{% else %}{{ path.prefix }}{% endif %}" + sum: "{{ pkgconfig.go.sums[go.vers][ansible_system][go.arch] }}" + sys: "{{ go.sys }}" + base_url: "{{ pkgconfig.go.base_url }}" + vers: "{{ go.vers }}" diff --git a/tasks/config/hashicorp.yml b/tasks/config/hashicorp.yml new file mode 100644 index 0000000..95905cf --- /dev/null +++ b/tasks/config/hashicorp.yml @@ -0,0 +1,13 @@ +- name: Set OS name for RedHat family + when: + - ansible_os_family == 'RedHat' + ansible.builtin.set_fact: + hashicorp: + repo: "{{ pkgconfig.hashicorp.Linux[rpm_dist.stdout].repo }}" + +- name: Set repo for debian + when: + - ansible_os_family == 'Debian' + ansible.builtin.set_fact: + hashicorp: + repo: "{{ pkgconfig.hashicorp.Linux.Debian.repo }}" diff --git a/tasks/config/httpie.yml b/tasks/config/httpie.yml new file mode 100644 index 0000000..7188a49 --- /dev/null +++ b/tasks/config/httpie.yml @@ -0,0 +1,10 @@ +- name: Set method for httpie + ansible.builtin.set_fact: + httpie: + method: "{{ pkgconfig.httpie.method[ansible_distribution] | default(pkgconfig.httpie.method.default) }}" + +- name: Set config for httpie + ansible.builtin.set_fact: + httpie: + method: "{{ httpie.method }}" + pkg: "{{ pkgconfig.httpie[httpie.method] }}" diff --git a/tasks/config/kitty.yml b/tasks/config/kitty.yml new file mode 100644 index 0000000..135d300 --- /dev/null +++ b/tasks/config/kitty.yml @@ -0,0 +1,4 @@ +- name: Set kitty config + ansible.builtin.set_fact: + kitty: + pkgs: "{{ pkgconfig.kitty.pkgs[ansible_system] }}" diff --git a/tasks/config/libreoffice.yml b/tasks/config/libreoffice.yml new file mode 100644 index 0000000..6dbd69a --- /dev/null +++ b/tasks/config/libreoffice.yml @@ -0,0 +1,8 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Set libreoffice config + ansible.builtin.set_fact: + libreoffice: + method: "{{ pkgconfig.libreoffice.methods[ansible_distribution] | default(pkgconfig.libreoffice.methods.default) }}" + flatpak: "{{ pkgconfig.libreoffice.flatpak }}" + pkgs: "{{ pkgconfig.libreoffice.pkgs[ansible_os_family] }}" diff --git a/tasks/config/luals.yml b/tasks/config/luals.yml new file mode 100644 index 0000000..fb78ce4 --- /dev/null +++ b/tasks/config/luals.yml @@ -0,0 +1,14 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Set luals config + ansible.builtin.set_fact: + luals: + vers: "{{ pkgconfig.luals.version }}" + sys: "{{ pkgconfig.luals.sysmap[ansible_system] }}" + arch: "{{ pkgconfig.luals.archmap[ansible_architecture] }}" + +- name: Set luals variables + ansible.builtin.set_fact: + luals_vars: + archive: "lua-language-server-{{ luals.vers }}-{{ luals.sys }}-{{ luals.arch }}.tar.gz" + url: "{{ pkgconfig.luals.base_url }}/{{ luals.vers }}" diff --git a/tasks/config/neovide.yml b/tasks/config/neovide.yml new file mode 100644 index 0000000..8f205ac --- /dev/null +++ b/tasks/config/neovide.yml @@ -0,0 +1,9 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Set neovide config + ansible.builtin.set_fact: + neovide: + name: neovide + deps: "{{ pkgconfig.neovide.build_deps[ansible_os_family] }}" + vers: "{{ pkgconfig.neovide.version }}" + locked: true diff --git a/tasks/config/neovim.yml b/tasks/config/neovim.yml new file mode 100644 index 0000000..eba49a8 --- /dev/null +++ b/tasks/config/neovim.yml @@ -0,0 +1,23 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Set neovim install method + ansible.builtin.set_fact: + neovim: + method: "{{ pkgconfig.neovim.methods[ansible_distribution] | default(pkgconfig.neovim.methods.default) }}" + +- name: Set neovim config + ansible.builtin.set_fact: + neovim: + method: "{{ neovim.method }}" + vers: "v{{ pkgconfig.neovim.version }}" + pkgs: "{{ pkgconfig.neovim.pkgs[ansible_distribution] | default(pkgconfig.neovim.pkgs.default) }}" + +- name: Set neovim config for appimage install + when: + - neovim.method == 'appimage' + ansible.builtin.set_fact: + neovim: + method: "{{ neovim.method }}" + file: "nvim-linux-{{ ansible_architecture }}.appimage" + link_name: nvim + url: "{{ pkgconfig.neovim.appimage.base_url }}/{{ neovim.vers }}/nvim-linux-{{ ansible_architecture }}.appimage" diff --git a/tasks/config/nerdfonts.yml b/tasks/config/nerdfonts.yml new file mode 100644 index 0000000..61e31ce --- /dev/null +++ b/tasks/config/nerdfonts.yml @@ -0,0 +1,15 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Set facts for nerdfonts + ansible.builtin.set_fact: + nerdfonts: + fonts: + - CascadiaCode + - FiraCode + - Hasklig + - Lilex + - Monoid + - NerdFontsSymbolsOnly + path: "{{ pkgconfig.nerdfonts.path }}" + base_url: "{{ pkgconfig.nerdfonts.base_url }}" + force_install: "{{ pkgconfig.force_install_nerdfonts | default(false) }}" diff --git a/tasks/config/nextcloud.yml b/tasks/config/nextcloud.yml new file mode 100644 index 0000000..ebbaa2f --- /dev/null +++ b/tasks/config/nextcloud.yml @@ -0,0 +1,13 @@ +- name: Set nextcloud install method + ansible.builtin.set_fact: + nextcloud: + method: "{{ pkgconfig.nextcloud.method | default('flatpak') }}" + +- name: Set nextcloud config + when: + - nextcloud.method == 'flatpak' + ansible.builtin.set_fact: + nextcloud: + method: "{{ nextcloud.method }}" + name: "{{ pkgconfig.nextcloud.flatpak.name }}" + remote: "{{ pkgconfig.nextcloud.flatpak.remote }}" diff --git a/tasks/config/nodejs.yml b/tasks/config/nodejs.yml new file mode 100644 index 0000000..1ee3330 --- /dev/null +++ b/tasks/config/nodejs.yml @@ -0,0 +1,4 @@ +- name: Set nodejs config + ansible.builtin.set_fact: + nodejs: + pkgs: "{{ pkgconfig.nodejs.pkgs[ansible_system] }}" diff --git a/tasks/config/nomad.yml b/tasks/config/nomad.yml new file mode 100644 index 0000000..00f347d --- /dev/null +++ b/tasks/config/nomad.yml @@ -0,0 +1,4 @@ +- name: Set nomad config + ansible.builtin.set_fact: + nomad: + pkgs: "{{ pkgconfig.nomad.pkgs[ansible_system] }}" diff --git a/tasks/config/packer.yml b/tasks/config/packer.yml new file mode 100644 index 0000000..dba9f71 --- /dev/null +++ b/tasks/config/packer.yml @@ -0,0 +1,4 @@ +- name: Set packer config + ansible.builtin.set_fact: + packer: + pkgs: "{{ pkgconfig.packer.pkgs[ansible_system] }}" diff --git a/tasks/config/pgadmin.yml b/tasks/config/pgadmin.yml new file mode 100644 index 0000000..b458e7d --- /dev/null +++ b/tasks/config/pgadmin.yml @@ -0,0 +1,6 @@ +- name: Set pgadmin config + ansible.builtin.set_fact: + pgadmin: + method: "{{ pkgconfig.pgadmin.methods[ansible_distribution] | default(pkgconfig.pgadmin.methods.default) }}" + pkgs: "{{ pkgconfig.pgadmin.pkgs[ansible_system] }}" + flatpak: "{{ pkgconfig.pgadmin.flatpak }}" diff --git a/tasks/config/python3.yml b/tasks/config/python3.yml new file mode 100644 index 0000000..986bacb --- /dev/null +++ b/tasks/config/python3.yml @@ -0,0 +1,5 @@ +--- +- name: Set python3 config + ansible.builtin.set_fact: + python3: + pkgs: "{{ pkgconfig.python3.pkgs[ansible_system] }}" diff --git a/tasks/config/rust.yml b/tasks/config/rust.yml new file mode 100644 index 0000000..56fdcc6 --- /dev/null +++ b/tasks/config/rust.yml @@ -0,0 +1,6 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Set rust config + ansible.builtin.set_fact: + rust: + pkgs: "{{ pkgconfig.rust.pkgs[ansible_system] }}" diff --git a/tasks/config/tailscale.yml b/tasks/config/tailscale.yml new file mode 100644 index 0000000..e8129ed --- /dev/null +++ b/tasks/config/tailscale.yml @@ -0,0 +1,5 @@ +- name: Set tailscale config + ansible.builtin.set_fact: + tailscale: + url_base: "{{ pkgconfig.tailscale.url_base }}" + release: "{{ pkgconfig.tailscale.release[ansible_distribution_release] | default({}) }}" diff --git a/tasks/config/terraform.yml b/tasks/config/terraform.yml new file mode 100644 index 0000000..a9081ba --- /dev/null +++ b/tasks/config/terraform.yml @@ -0,0 +1,4 @@ +- name: Set terraform config + ansible.builtin.set_fact: + terraform: + pkgs: "{{ pkgconfig.terraform.pkgs[ansible_system] }}" diff --git a/tasks/config/terraformls.yml b/tasks/config/terraformls.yml new file mode 100644 index 0000000..4389106 --- /dev/null +++ b/tasks/config/terraformls.yml @@ -0,0 +1,4 @@ +- name: Set terraformls config + ansible.builtin.set_fact: + terraformls: + pkgs: "{{ pkgconfig.terraformls.pkgs[ansible_system] }}" diff --git a/tasks/config/tidy.yml b/tasks/config/tidy.yml new file mode 100644 index 0000000..8ea18c2 --- /dev/null +++ b/tasks/config/tidy.yml @@ -0,0 +1,4 @@ +- name: Set tidy config + ansible.builtin.set_fact: + tidy: + pkgs: "{{ pkgconfig.tidy.pkgs[ansible_system] }}" diff --git a/tasks/config/vault.yml b/tasks/config/vault.yml new file mode 100644 index 0000000..e986501 --- /dev/null +++ b/tasks/config/vault.yml @@ -0,0 +1,4 @@ +- name: Set vault config + ansible.builtin.set_fact: + vault: + pkgs: "{{ pkgconfig.vault.pkgs[ansible_system] }}" diff --git a/tasks/config/xh.yml b/tasks/config/xh.yml new file mode 100644 index 0000000..7a97674 --- /dev/null +++ b/tasks/config/xh.yml @@ -0,0 +1,7 @@ +--- +- name: Set xh config + ansible.builtin.set_fact: + xh: + vers: "{{ pkgconfig.xh.version }}" + name: xh + locked: true diff --git a/tasks/config/zfs.yml b/tasks/config/zfs.yml new file mode 100644 index 0000000..88925b3 --- /dev/null +++ b/tasks/config/zfs.yml @@ -0,0 +1,22 @@ +--- +- name: Set distro name + when: + - ansible_os_family == 'RedHat' + ansible.builtin.set_fact: + rhname: "{%if ansible_distribution == 'Fedora' %}fedora{% else %}epel{% endif %}" + +- name: Set deps for distros + ansible.builtin.set_fact: + zfs: + deps: "{% if ansible_distribution == 'Fedora' %}{{ pkgconfig.zfs.build_deps.Fedora }}{% else %}{{ pkgconfig.zfs.build_deps[ansible_os_family] }}{% endif %}" + +- name: Set ZFS config + ansible.builtin.set_fact: + zfs: + repo_pkg: "{{ pkgconfig.zfs.repo_base }}/{{ rhname }}/zfs-release-{{ pkgconfig.zfs[rhname].release }}{{ rpm_dist.stdout }}.noarch.rpm" + deps: "{{ zfs.deps }}" + pkgs: "{{ pkgconfig.zfs.pkgs[ansible_os_family] }}" + skip_gpg_check: "{{ rhname == 'fedora' }}" + release: "{{ ansible_distribution_release }}" + gpg_key: "{{ pkgconfig.zfs.gpg_key }}" + gpg_fp: "{{ pkgconfig.zfs.gpg_key_fingerprint }}" diff --git a/tasks/config/zig.yml b/tasks/config/zig.yml new file mode 100644 index 0000000..dcb875b --- /dev/null +++ b/tasks/config/zig.yml @@ -0,0 +1,9 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Set zig configuration + ansible.builtin.set_fact: + zig: + vers: "{{ pkgconfig.zig.version }}" + path: "zig-{{ pkgconfig.zig.sysmap[ansible_system] }}-{{ pkgconfig.zig.archmap[ansible_architecture] }}-{{ pkgconfig.zig.version }}" + pkg: "zig-{{ pkgconfig.zig.sysmap[ansible_system] }}-{{ pkgconfig.zig.archmap[ansible_architecture] }}-{{ pkgconfig.zig.version }}.tar.xz" + base_url: "{{ pkgconfig.zig.base_url }}" diff --git a/tasks/config/zls.yml b/tasks/config/zls.yml new file mode 100644 index 0000000..b53b8e6 --- /dev/null +++ b/tasks/config/zls.yml @@ -0,0 +1,9 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Set zls config + ansible.builtin.set_fact: + zls: + path: "zls-{{ pkgconfig.zls.sysmap[ansible_system] }}-{{ pkgconfig.zls.archmap[ansible_architecture] }}-{{ pkgconfig.zls.version }}" + pkg: "zls-{{ pkgconfig.zls.sysmap[ansible_system] }}-{{ pkgconfig.zls.archmap[ansible_architecture] }}-{{ pkgconfig.zls.version }}.tar.xz" + vers: "{{ pkgconfig.zls.version }}" + base_url: "{{ pkgconfig.zls.base_url }}" diff --git a/tasks/facts.yml b/tasks/facts.yml new file mode 100644 index 0000000..f6a6d18 --- /dev/null +++ b/tasks/facts.yml @@ -0,0 +1,59 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Set facts for installation + ansible.builtin.set_fact: + ext_become: "{{ not use_local }}" + path: + prefix: "{% if use_local %}{{ lookup('ansible.builtin.env', 'HOME') }}/.local{% else %}{{ defaults.path.prefix }}{% endif %}" + +- name: Set Linux specific facts + when: + - ansible_system == 'Linux' + ansible.builtin.set_fact: + flatpak_remote: # flatpak remotes, includes flathub by default + - name: flathub + url: https://dl.flathub.org/repo/flathub.flatpakrepo + flatpak_method: "{% if use_local %}user{% else %}system{% endif %}" + pkg_appimage: [] # appimages to install + pkg_flatpak: [] # flatpak packages to install + pkg_snap: [] # snpacraft.io packages + sys_pkg_become: true # Linux package managers require sudo access + +- name: Set rpm dist if RedHat based + when: + - ansible_os_family == 'RedHat' + changed_when: false + register: rpm_dist + ansible.builtin.command: + cmd: rpm --eval "%{dist}" + +- name: Set macOS specific facts + when: + - ansible_distribution == 'MacOSX' + ansible.builtin.set_fact: + brewtap: [] # homebrew taps to add + pipx_exec: "/opt/homebrew/bin/pipx" + pkg_cask: [] # homebrew casks + pkg_tap: [] # homebrew tap packages + sys_pkg_become: false # homebrew doesn't require sudo access + +- name: Set paths + ansible.builtin.set_fact: + path: + prefix: "{{ path.prefix }}" + appimage: "{{ path.appimage | default(path.prefix ~ defaults.path.suffix.appimage) }}" + archive: "{{ path.archive | default(path.prefix ~ defaults.path.suffix.archive) }}" + bin: "{{ path.bin | default(path.prefix ~ defaults.path.suffix.bin) }}" + cargo: "{{ path.cargo | default(path.prefix ~ defaults.path.suffix.cargo) }}" + go: "{% if ansible_distribution == 'MacOSX' %}/usr/local/go{% else %}{{ path.go | default(path.prefix ~ defaults.path.suffix.go) }}{% endif %}" + pipx: "{{ path.pipx | default(path.prefix ~ defaults.path.suffix.pipx) }}" + +- name: Set OS independant facts + ansible.builtin.set_fact: + pkg_archive: [] # packages installed via prebuilt archive + pkg_cargo: [] # rust packages from cargo + pkg_go: [] # go applications + pkg_npm: [] # npm commands + pkg_pipx: [] # pipx packages + pkg_src: [] # packages built from source + pkg_sys: [] # system package manager packages, homebrew on macOS, dnf for RedHat based, apt for Debian Based diff --git a/tasks/go.yml b/tasks/go.yml new file mode 100644 index 0000000..3c525ef --- /dev/null +++ b/tasks/go.yml @@ -0,0 +1,8 @@ +--- +- name: Install go package {{ pkg }} + become: "{{ ext_become }}" + environment: + GOBIN: "{{ path.bin }}" + PATH: "{{ path.go }}/bin:$PATH" + ansible.builtin.command: + cmd: go install {{ pkg }} diff --git a/tasks/linux.yml b/tasks/linux.yml new file mode 100644 index 0000000..55143bd --- /dev/null +++ b/tasks/linux.yml @@ -0,0 +1,50 @@ +# vim: set filetype=yaml.ansible : +--- + +- name: Install flatpaks on Linux Systems + when: + - pkg_flatpak|length > 0 + block: + - name: Add flatpak remotes + when: + - flatpak_remote|length > 0 + become: "{{ ext_become }}" + loop: "{{ flatpak_remote | unique }}" + loop_control: + loop_var: remote + community.general.flatpak_remote: + enabled: true + flatpakrepo_url: "{{ remote.url }}" + method: "{{ flatpak_method }}" + name: "{{ remote.name }}" + state: present + + - name: Install flatpaks + when: + - pkg_flatpak|length > 0 + become: "{{ ext_become }}" + block: + - name: Debug flatpak + loop: "{{ pkg_flatpak | unique }}" + loop_control: + loop_var: flatpak + ansible.builtin.debug: + var: flatpak + - name: Install flatpak + loop: "{{ pkg_flatpak | unique }}" + loop_control: + loop_var: flatpak + community.general.flatpak: + method: "{{ flatpak_method }}" + name: "{{ flatpak.name }}" + remote: "{{ flatpak.remote | default('flathub') }}" + state: present + +- name: Install pkg_appimage + when: + - pkg_appimage|length > 0 + loop: "{{ pkg_appimage }}" + loop_control: + loop_var: pkg + ansible.builtin.include_tasks: + file: appimage.yml diff --git a/tasks/macos.yml b/tasks/macos.yml new file mode 100644 index 0000000..8cc98ac --- /dev/null +++ b/tasks/macos.yml @@ -0,0 +1,22 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Tap homebrew taps + when: + - brewtap|length > 0 + community.general.homebrew_tap: + name: "{{ brewtap | unique }}" + state: present + +- name: Install homebrew casks + when: pkg_cask|length > 0 + community.general.homebrew_cask: + name: "{{ pkg_cask | unique }}" + state: present + +# TODO: fix the need to have this workaround +- name: Workaround to install homebrew taps + when: + - pkg_tap|length > 0 + changed_when: true + ansible.builtin.command: + cmd: "brew install {{ (pkg_tap | unique) | join(' ') }}" diff --git a/tasks/main.yml b/tasks/main.yml index 8f82458..1285033 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,196 +1,116 @@ # vim: set filetype=yaml.ansible : --- -- name: generate package installation lists +# create all the facts used throughout the role, but shouldn't be touched +# by the user +- name: Create temporary directory for downloads + ansible.builtin.tempfile: + state: directory + prefix: ansible_role_package. + register: d_tempdir + +- name: Set installation facts ansible.builtin.include_tasks: - file: addpkg.yml + file: facts.yml + +- name: Ensure required path exist + become: "{{ ext_become }}" + loop: "{{ path | dict2items }}" + loop_control: + loop_var: p + ansible.builtin.file: + state: directory + mode: '0755' + path: "{{ p.value }}" + +- name: Read default package configuration + ansible.builtin.include_vars: + dir: pkgs + extensions: + - yml + name: pkgconfig + +- name: Generate package installation lists loop: "{{ packages | unique }}" loop_control: loop_var: pkg - -- name: redhat based OS - block: - - name: upgrade dnf packages - ansible.builtin.dnf: - name: "*" - state: latest - become: true - when: full_upgrade - - - name: install dnf packages - ansible.builtin.dnf: - name: "{{ syspkgs | unique }}" - state: "{{ install_state }}" - become: true - when: - - syspkgs|length > 0 - - - name: add flatpak repos - community.general.flatpak_remote: - enabled: true - flatpakrepo_url: "{{ repo.url }}" - method: system - name: "{{ repo.name }}" - state: present - loop: "{{ flatpkg_repo }}" - loop_control: - loop_var: repo - become: true - when: - - flatpkg_repo|length > 0 - - flatpkgs|length > 0 - - - name: install flatpaks - community.general.flatpak: - method: "system" - name: "{{ flatpkgs }}" - state: latest - become: true - when: - - flatpkgs|length > 0 - when: ansible_os_family == 'RedHat' - -- name: debian based OS - block: - - name: upgrade apt packages - ansible.builtin.apt: - name: "*" - state: latest - become: true - when: full_upgrade - - - name: install apt packages - ansible.builtin.apt: - name: "{{ syspkgs | unique }}" - state: "{{ install_state }}" - become: true - when: - - syspkgs|length > 0 - - - name: add flatpak repos - community.general.flatpak_remote: - enabled: true - flatpakrepo_url: "{{ repo.url }}" - method: system - name: "{{ repo.name }}" - state: present - loop: "{{ flatpkg_repo | unique }}" - loop_control: - loop_var: repo - become: true - when: - - flatpkg_repo|length > 0 - - flatpkgs|length > 0 - - - name: install flatpaks - community.general.flatpak: - method: "system" - name: "{{ flatpkgs | unique }}" - state: latest - become: true - when: - - flatpkgs|length > 0 - when: ansible_os_family == 'Debian' - -- name: darwin/macOS based OS - block: - - name: upgrade homebrew packages - community.general.homebrew: - name: "*" - state: latest - when: full_upgrade - - - name: tap homebrew taps - community.general.homebrew_tap: - name: "{{ brewtaps | unique }}" - state: present - when: brewtaps|length > 0 - - - name: install homebrew packages - community.general.homebrew: - name: "{{ syspkgs | unique }}" - state: "{{ install_state }}" - when: syspkgs|length > 0 - - - name: install homebrew casks - community.general.homebrew_cask: - name: "{{ caskpkgs | unique }}" - state: "{{ install_state }}" - when: caskpkgs|length > 0 - - - name: workaround to install homebrew taps - ansible.builtin.command: - cmd: "brew install {{ tappkg }}" - loop: "{{ tappkgs | unique }}" - loop_control: - loop_var: tappkg - when: ansible_os_family == 'Darwin' - -- name: ensure /usr/local/bin exists - ansible.builtin.file: - state: directory - path: /usr/local/bin - owner: root - mode: '0755' - become: true - -- name: install srcpkgs ansible.builtin.include_tasks: - file: "build/{{ srcpkg }}.yml" - loop: "{{ srcpkgs | unique }}" - loop_control: - loop_var: srcpkg - when: srcpkgs|length > 0 + file: addpkg.yml -- name: install cargo packages at specific version - community.general.cargo: - name: "{{ cargopkg.name }}" - version: "{{ cargopkg.version }}" - path: "{{ cargopkg.path | default(default_config.install_prefix) }}" - locked: "{{ cargopkg.locked | default(false) }}" - become: true - when: cargoversioned|length > 0 - loop: "{{ cargoversioned | unique }}" - loop_control: - loop_var: cargopkg +- name: Flush handlers to ensure dependencies are installed + ansible.builtin.meta: flush_handlers -- name: Install cargo packages at latest version - community.general.cargo: - name: "{{ cargopkg }}" - state: latest - locked: "{{ cargopkg.locked | default(false) }}" - when: cargopkgs|length > 0 - loop: "{{ cargopkgs | unique }}" - loop_control: - loop_var: cargopkg +- name: Add needed MacOS packages + when: + - ansible_distribution == 'MacOSX' + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + ['gnu-tar', 'virtualenv'] }}" -- name: Install local go packages - environment: - GOROOT: /usr/local/go - PATH: /usr/local/go/bin:$PATH - ansible.builtin.command: - cmd: "go install {{ gopkg }}" - loop: "{{ gopkgs | unique }}" +- name: Install sys_pkgs list using system package manager + become: "{{ sys_pkg_become }}" + ansible.builtin.package: + name: "{{ pkg_sys | unique }}" + state: present + +- name: Linux specific tasks + when: + - ansible_system == 'Linux' + ansible.builtin.include_tasks: + file: linux.yml + +- name: MacOS specific tasks + when: + - ansible_distribution == 'MacOSX' + ansible.builtin.include_tasks: + file: macos.yml + +- name: Install pkg_archive + when: + - pkg_archive|length > 0 + loop: "{{ pkg_archive }}" loop_control: - loop_var: gopkg - when: gopkgs|length > 0 + loop_var: pkg + ansible.builtin.include_tasks: + file: "archive/{{ pkg }}.yml" + +- name: Build and install source packages + when: + - pkg_src|length > 0 + loop: "{{ pkg_src | unique }}" + loop_control: + loop_var: pkg + ansible.builtin.include_tasks: + file: "src/{{ pkg }}.yml" + +- name: Install cargo packages + when: + - pkg_cargo|length > 0 + loop: "{{ pkg_cargo | unique }}" + loop_control: + loop_var: pkg + ansible.builtin.include_tasks: + file: cargo.yml + +- name: Install go packages + when: + - pkg_go|length > 0 + loop: "{{ pkg_go | unique }}" + loop_control: + loop_var: pkg + ansible.builtin.include_tasks: + file: go.yml - name: Install local npm packages - become: "{% if ansible_system == 'Linux' %}true{% else %}false{% endif %}" - community.general.npm: - global: true - name: "{{ npmpkg }}" - state: latest - loop: "{{ npmpkgs | unique }}" + loop: "{{ pkg_npm | unique }}" loop_control: - loop_var: npmpkg - when: npmpkgs|length > 0 + loop_var: pkg + ansible.builtin.include_tasks: + file: npm.yml - name: Install python pipx packages for user - community.general.pipx: - executable: "{% if ansible_os_family == 'Darwin' %}/opt/homebrew/bin/pipx{% else %}/usr/bin/pipx{% endif %}" - name: "{{ pipxpkg }}" - state: latest - loop: "{{ pipxpkgs | unique }}" + when: + - pkg_pipx|length > 0 + loop: "{{ pkg_pipx | unique }}" loop_control: - loop_var: pipxpkg - when: pipxpkgs|length > 0 + loop_var: pkg + ansible.builtin.include_tasks: + file: pipx.yml diff --git a/tasks/npm.yml b/tasks/npm.yml new file mode 100644 index 0000000..e0c3a0a --- /dev/null +++ b/tasks/npm.yml @@ -0,0 +1,8 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Install npm {{ pkg }} + become: "{{ ext_become }}" + community.general.npm: + global: true + name: "{{ pkg }}" + state: present diff --git a/tasks/pipx.yml b/tasks/pipx.yml new file mode 100644 index 0000000..0f82031 --- /dev/null +++ b/tasks/pipx.yml @@ -0,0 +1,11 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Install pipx {{ pkg }} + become: "{{ ext_become }}" + environment: + PIPX_HOME: "{{ path.pipx }}" + PIPX_BIN_DIR: "{{ path.bin }}" + community.general.pipx: + executable: "{{ pipx_exec }}" + name: "{{ pkg }}" + state: latest diff --git a/tasks/pkgs/air.yml b/tasks/pkgs/air.yml index ebcba5c..9194eb7 100644 --- a/tasks/pkgs/air.yml +++ b/tasks/pkgs/air.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/go.yml - when: pkgconfig_go is undefined - -- name: add to gopkgs +- name: Add to pkg_go + notify: + - Depend go + changed_when: true ansible.builtin.set_fact: - gopkgs: "{{ gopkgs + ['github.com/air-verse/air@latest'] }}" + pkg_go: "{{ pkg_go + ['github.com/air-verse/air@latest'] }}" diff --git a/tasks/pkgs/alacritty.yml b/tasks/pkgs/alacritty.yml index b5f7f08..dfce7fb 100644 --- a/tasks/pkgs/alacritty.yml +++ b/tasks/pkgs/alacritty.yml @@ -1,25 +1,19 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_vars: - file: alacritty.yml - name: _alacritty -- ansible.builtin.set_fact: - pkgconfig_alacritty: "{{ _alacritty | ansible.builtin.combine(pkgconfig.alacritty) }}" - -- name: linux based installation - when: ansible_system == 'Linux' +- name: Linux based installation + when: + - ansible_system == 'Linux' block: - - name: install rust and cargo - ansible.builtin.include_tasks: - file: "pkgs/rust.yml" - when: pkgconfig_rust is undefined + - name: Append to pkgs + notify: + - Depend cargo + changed_when: true + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + alacritty.deps }}" + pkg_cargo: "{{ pkg_cargo + [alacritty] }}" - - name: append to pkgs - set_fact: - syspkgs: "{{ syspkgs + pkgconfig_alacritty.deps[ansible_distribution] }}" - srcpkgs: "{{ srcpkgs + [ 'alacritty' ] }}" - -- name: append alacritty to caskpkgs +- name: Append alacritty to caskpkgs + when: + - ansible_system == 'Darwin' ansible.builtin.set_fact: - caskpkgs: "{{ caskpkgs + [ 'alacritty' ] }}" - when: ansible_system == 'Darwin' + pkg_cask: "{{ pkg_cask + alacritty.cask }}" diff --git a/tasks/pkgs/ansible-language-server.yml b/tasks/pkgs/ansible-language-server.yml index f70ee4a..fd1724e 100644 --- a/tasks/pkgs/ansible-language-server.yml +++ b/tasks/pkgs/ansible-language-server.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/nodejs.yml - when: nodejs is undefined - -- name: add to npmpkgs +- name: Add to pkg_npm + notify: + - Depend node + changed_when: true ansible.builtin.set_fact: - npmpkgs: "{{ npmpkgs + ['@ansible/ansible-language-server'] }}" + pkg_npm: "{{ pkg_npm + ['@ansible/ansible-language-server'] }}" diff --git a/tasks/pkgs/ansible-lint.yml b/tasks/pkgs/ansible-lint.yml index ae73c58..cd46295 100644 --- a/tasks/pkgs/ansible-lint.yml +++ b/tasks/pkgs/ansible-lint.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkgs ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'ansible-lint' ] }}" + pkg_sys: "{{ pkg_sys + ['ansible-lint'] }}" diff --git a/tasks/pkgs/ansible.yml b/tasks/pkgs/ansible.yml index 4516c65..06f153b 100644 --- a/tasks/pkgs/ansible.yml +++ b/tasks/pkgs/ansible.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkgs ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'ansible' ] }}" + pkg_sys: "{{ pkg_sys + ['ansible'] }}" diff --git a/tasks/pkgs/bashls.yml b/tasks/pkgs/bashls.yml index d3b6bf8..a583217 100644 --- a/tasks/pkgs/bashls.yml +++ b/tasks/pkgs/bashls.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/nodejs.yml - when: nodejs is undefined - -- name: add to npmpkgs +- name: Add to pkg_npm + notify: + - Depend node + changed_when: true ansible.builtin.set_fact: - npmpkgs: "{{ npmpkgs + [ 'bash-language-server' ] }}" + pkg_npm: "{{ pkg_npm + ['bash-language-server'] }}" diff --git a/tasks/pkgs/bat.yml b/tasks/pkgs/bat.yml index cfcbe11..1b86536 100644 --- a/tasks/pkgs/bat.yml +++ b/tasks/pkgs/bat.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to syspkgs +- name: Append to pkg_sys ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'bat' ] }}" + pkg_sys: "{{ pkg_sys + ['bat'] }}" diff --git a/tasks/pkgs/bitwarden.yml b/tasks/pkgs/bitwarden.yml index 42c4d17..fb810e5 100644 --- a/tasks/pkgs/bitwarden.yml +++ b/tasks/pkgs/bitwarden.yml @@ -1,31 +1,22 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_vars: - file: bitwarden.yml - name: _bitwarden -- ansible.builtin.set_fact: - pkgconfig_bitwarden: "{{ _bitwarden | ansible.builtin.combine(pkgconfig.bitwarden) }}" - -- name: append to flatpkgs - block: - - ansible.builtin.include_tasks: - file: pkgs/flatpak.yml - when: flatpak is undefined - - - ansible.builtin.set_fact: - flatpkgs: "{{ flatpkgs + [ 'com.bitwarden.desktop' ] }}" +- name: Append to pkg_flatpak when: - - ansible_os_family != 'Darwin' - - pkgconfig_bitwarden.use_flatpak - -- name: append to srcpkgs + - bitwarden.method == 'flatpak' + notify: + - Depend flatpak + changed_when: true ansible.builtin.set_fact: - syspkgs: "{{ srcpkgs + [ 'bitwarden' ] }}" + pkg_flatpak: "{{ pkg_flatpak + [bitwarden.pkg] }}" + +- name: Append to pkg_appimage when: - - ansible_os_family != 'Darwin' - - not pkgconfig_bitwarden.use_flatpak - -- name: append to caskpkgs + - bitwarden.method == 'appimage' ansible.builtin.set_fact: - caskpkgs: "{{ caskpkgs + [ 'bitwarden' ] }}" - when: ansible_os_family == 'Darwin' + pkg_appimage: "{{ pkg_appimage + [bitwarden.pkg] }}" + +- name: Append to pkg_cask + when: + - bitwarden.method == 'brew' + ansible.builtin.set_fact: + pkg_cask: "{{ pkg_cask + [bitwarden] }}" diff --git a/tasks/pkgs/blender.yml b/tasks/pkgs/blender.yml index eece2b2..1c80133 100644 --- a/tasks/pkgs/blender.yml +++ b/tasks/pkgs/blender.yml @@ -1,11 +1,13 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkg_sys + when: + - ansible_system == 'Linux' ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'blender' ] }}" - when: ansible_os_family != 'Darwin' + pkg_sys: "{{ pkg_sys + ['blender'] }}" -- name: append to caskpkgs +- name: Append to pkg_cask + when: + - ansible_system == 'Darwin' ansible.builtin.set_fact: - caskpkgs: "{{ caskpkgs + [ 'blender' ] }}" - when: ansible_os_family == 'Darwin' + pkg_cask: "{{ pkg_cask + ['blender'] }}" diff --git a/tasks/pkgs/broot.yml b/tasks/pkgs/broot.yml index 417266a..030a254 100644 --- a/tasks/pkgs/broot.yml +++ b/tasks/pkgs/broot.yml @@ -1,21 +1,17 @@ # vim: set filetype=yaml.ansible : --- -- name: linux specific install - block: - - ansible.builtin.include_tasks: - file: "pkgs/rust.yml" - when: pkgconfig_rust is undefined - - - name: append to syspkgs and cargopkgs - ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig.broot.deps[ansible_os_family] }}" - cargopkgs: "{{ cargopkgs + [ 'broot' ] }}" - +- name: Append to pkg_sys and pkg_cargo when: - - ansible_os_family != 'Darwin' - -- name: append to syspkgs + - ansible_system == 'Linux' + notify: + - Depend cargo + changed_when: true ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'broot' ] }}" + pkg_sys: "{{ pkg_sys + broot.deps }}" + pkg_cargo: "{{ pkg_cargo + [broot] }}" + +- name: Append to pkg_sys when: - - ansible_os_family == 'Darwin' + - ansible_system == 'Darwin' + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + ['broot'] }}" diff --git a/tasks/pkgs/btop.yml b/tasks/pkgs/btop.yml index 2ca6525..63dc7d4 100644 --- a/tasks/pkgs/btop.yml +++ b/tasks/pkgs/btop.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkg_ssys ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'btop' ] }}" + pkg_sys: "{{ pkg_sys + ['btop'] }}" diff --git a/tasks/pkgs/buf.yml b/tasks/pkgs/buf.yml index a2b7495..523da55 100644 --- a/tasks/pkgs/buf.yml +++ b/tasks/pkgs/buf.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/go.yml - when: pkgconfig_go is undefined - -- name: add to gopkgs +- name: Add to pkg_go + notify: + - Depend go + changed_when: true ansible.builtin.set_fact: - gopkgs: "{{ gopkgs + ['github.com/bufbuild/buf/cmd/buf@latest'] }}" + pkg_go: "{{ pkg_go + ['github.com/bufbuild/buf/cmd/buf@latest'] }}" diff --git a/tasks/pkgs/bufls.yml b/tasks/pkgs/bufls.yml index 2cc99e7..5c3ad91 100644 --- a/tasks/pkgs/bufls.yml +++ b/tasks/pkgs/bufls.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/go.yml - when: pkgconfig_go is undefined - -- name: add to gopkgs +- name: Add to pkg_go + notify: + - Depend go + changed_when: true ansible.builtin.set_fact: - gopkgs: "{{ gopkgs + [ 'github.com/bufbuild/buf-language-server/cmd/bufls@latest' ] }}" + pkg_go: "{{ pkg_go + ['github.com/bufbuild/buf-language-server/cmd/bufls@latest'] }}" diff --git a/tasks/pkgs/carapace.yml b/tasks/pkgs/carapace.yml index fc9d0cb..2d4d8a3 100644 --- a/tasks/pkgs/carapace.yml +++ b/tasks/pkgs/carapace.yml @@ -1,31 +1,27 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_vars: - file: carapace.yml - name: _carapace -- ansible.builtin.set_fact: - pkgconfig_carapace: "{{ _carapace | ansible.builtin.combine(pkgconfig.carapace) }}" - -- name: enable carapace yum repository +- name: Enable carapace yum repository + when: + - ansible_os_family == 'RedHat' + become: true ansible.builtin.yum_repository: - name: carapace-yum - description: carapace-yum - baseurl: https://yum.fury.io/rsteube/ + name: "{{ carapace.repo.name }}" + description: "{{ carapace.repo.description }}" + baseurl: "{{ carapace.repo.baseurl }}" enabled: true gpgcheck: false state: present - when: ansible_os_family == 'RedHat' - become: true -- name: enable carapace apt repository +- name: Enable carapace apt repository + when: + - ansible_os_family == 'Debian' become: true ansible.builtin.apt_repository: - repo: "deb [trusted=yes] https://apt.fury.io/rsteube/ /" + repo: "{{ carapace.repo.repo }}" + filename: "{{ carapace.repo.name }}" state: present update_cache: false - filename: carapace - when: ansible_os_family == 'Debian' -- name: add carapace to syspkgs +- name: Add carapace to pkg_sys ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig_carapace.pkgs[ansible_system] }}" + pkg_sys: "{{ pkg_sys + carapace.pkgs }}" diff --git a/tasks/pkgs/cheat.yml b/tasks/pkgs/cheat.yml index 26d0b1d..7cfaaef 100644 --- a/tasks/pkgs/cheat.yml +++ b/tasks/pkgs/cheat.yml @@ -1,10 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: "pkgs/go.yml" - when: - - pkgconfig_go is undefined - -- name: append to gopkgs +- name: Append to pkg_go + notify: + - Depend go + changed_when: true ansible.builtin.set_fact: - gopkgs: "{{ gopkgs + [ 'github.com/cheat/cheat/cmd/cheat@latest' ] }}" + pkg_go: "{{ pkg_go + ['github.com/cheat/cheat/cmd/cheat@latest'] }}" diff --git a/tasks/pkgs/checkmake.yml b/tasks/pkgs/checkmake.yml index 6dc1389..3d52128 100644 --- a/tasks/pkgs/checkmake.yml +++ b/tasks/pkgs/checkmake.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/go.yml - when: pkgconfig_go is undefined - -- name: add to gopkgs +- name: Add to pkg_go + notify: + - Depend go + changed_when: true ansible.builtin.set_fact: - gopkgs: "{{ gopkgs + ['github.com/mrtazz/checkmake/cmd/checkmake@latest'] }}" + pkg_go: "{{ pkg_go + ['github.com/mrtazz/checkmake/cmd/checkmake@latest'] }}" diff --git a/tasks/pkgs/choose.yml b/tasks/pkgs/choose.yml index 7df38b8..55a9258 100644 --- a/tasks/pkgs/choose.yml +++ b/tasks/pkgs/choose.yml @@ -1,19 +1,16 @@ # vim: set filetype=yaml.ansible : --- -- name: linux specific - block: - - ansible.builtin.include_tasks: - file: "pkgs/rust.yml" - when: - - pkgconfig_rust is undefined - - name: append to cargopkgs - ansible.builtin.set_fact: - cargopkgs: "{{ cargopkgs + [ 'choose' ] }}" +- name: Append to cargopkgs when: - - ansible_os_family != 'Darwin' - -- name: append to syspkgs + - ansible_system == 'Linux' + notify: + - Depend cargo + changed_when: true ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'choose-rust' ] }}" + pkg_cargo: "{{ pkg_cargo + [choose] }}" + +- name: Append to pkg_sys when: - - ansible_os_family == 'Darwin' + - ansible_system == 'Darwin' + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + ['choose-rust'] }}" diff --git a/tasks/pkgs/clangd.yml b/tasks/pkgs/clangd.yml index e6de283..d7ee19d 100644 --- a/tasks/pkgs/clangd.yml +++ b/tasks/pkgs/clangd.yml @@ -1,7 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.set_fact: - clangd: true - -- ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig.clangd.pkgs[ansible_os_family] }}" +- name: Append clangd to pkg_sys + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + clangd.pkgs }}" diff --git a/tasks/pkgs/cmake.yml b/tasks/pkgs/cmake.yml index f6ae1b7..8ffcabc 100644 --- a/tasks/pkgs/cmake.yml +++ b/tasks/pkgs/cmake.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkgs ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'cmake' ] }}" + pkg_sys: "{{ pkg_sys + ['cmake'] }}" diff --git a/tasks/pkgs/cmakelang.yml b/tasks/pkgs/cmakelang.yml index dceba97..35696c2 100644 --- a/tasks/pkgs/cmakelang.yml +++ b/tasks/pkgs/cmakelang.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/pipx.yml - when: pipx is undefined - -- name: add to pipxpkgs +- name: Add to pkg_pipx + notify: + - Depend pipx + changed_when: true ansible.builtin.set_fact: - pipxpkgs: "{{ pipxpkgs + ['cmakelang'] }}" + pkg_pipx: "{{ pkg_pipx + ['cmakelang'] }}" diff --git a/tasks/pkgs/commitlint-cli.yml b/tasks/pkgs/commitlint-cli.yml index f135c85..bd00686 100644 --- a/tasks/pkgs/commitlint-cli.yml +++ b/tasks/pkgs/commitlint-cli.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/nodejs.yml - when: nodejs is undefined - -- name: add to npmpkgs +- name: Add to pkg_npm + notify: + - Depend node + changed_when: true ansible.builtin.set_fact: - npmpkgs: "{{ npmpkgs + ['@commitlint/cli'] }}" + pkg_npm: "{{ pkg_npm + ['@commitlint/cli'] }}" diff --git a/tasks/pkgs/commitlint-config-conventional.yml b/tasks/pkgs/commitlint-config-conventional.yml index 534dd80..4b9a590 100644 --- a/tasks/pkgs/commitlint-config-conventional.yml +++ b/tasks/pkgs/commitlint-config-conventional.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/nodejs.yml - when: nodejs is undefined - -- name: add to npmpkgs +- name: Add to pkg_npm + notify: + - Depend node + changed_when: true ansible.builtin.set_fact: - npmpkgs: "{{ npmpkgs + ['@commitlint/config-conventional'] }}" + pkg_npm: "{{ pkg_npm + ['@commitlint/config-conventional'] }}" diff --git a/tasks/pkgs/consul.yml b/tasks/pkgs/consul.yml index 888e435..6cfeb6f 100644 --- a/tasks/pkgs/consul.yml +++ b/tasks/pkgs/consul.yml @@ -1,16 +1,19 @@ # vim: set filetype=yaml.ansible : -# load hashicorp configuration --- -- name: ensure hashicorp repo is active - ansible.builtin.include_tasks: - file: "pkgs/hashicorp_repo.yml" - when: hashicorp is undefined - -- name: append to syspkgs +- name: Append to pkg_sys + when: + - ansible_system == 'Linux' + notify: + - Depend hashicorp repo + changed_when: true ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ pkgconfig.consul[ansible_system] ] }}" - when: ansible_system == 'Linux' + pkg_sys: "{{ pkg_sys + consul.pkgs }}" -- ansible.builtin.set_fact: - tappkgs: "{{ tappkgs + [ pkgconfig.consul[ansible_system] ] }}" - when: ansible_system == 'Darwin' +- name: Append to pkg_tap + when: + - ansible_system == 'Darwin' + notify: + - Depend hashicorp repo + changed_when: true + ansible.builtin.set_fact: + pkg_tap: "{{ pkg_tap + consul.pkgs }}" diff --git a/tasks/pkgs/cssls.yml b/tasks/pkgs/cssls.yml index 0d5626d..b529871 100644 --- a/tasks/pkgs/cssls.yml +++ b/tasks/pkgs/cssls.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/nodejs.yml - when: nodejs is undefined - -- name: add to npmpkgs +- name: Add to pkg_npm + notify: + - Depend node + changed_when: true ansible.builtin.set_fact: - npmpkgs: "{{ npmpkgs + ['vscode-langservers-extracted'] }}" + pkg_npm: "{{ pkg_npm + ['vscode-langservers-extracted'] }}" diff --git a/tasks/pkgs/curlie.yml b/tasks/pkgs/curlie.yml index 7058f89..939d105 100644 --- a/tasks/pkgs/curlie.yml +++ b/tasks/pkgs/curlie.yml @@ -1,5 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- name: append to gopkgs +- name: Append to pkg_go + notify: + - Depend go + changed_when: true ansible.builtin.set_fact: - gopkgs: "{{ gopkgs + [ 'github.com/rs/curlie@latest' ] }}" + pkg_go: "{{ pkg_go + ['github.com/rs/curlie@latest'] }}" diff --git a/tasks/pkgs/dbeaver.yml b/tasks/pkgs/dbeaver.yml index 40f4579..bbfdd19 100644 --- a/tasks/pkgs/dbeaver.yml +++ b/tasks/pkgs/dbeaver.yml @@ -1,15 +1,16 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/flatpak.yml - when: flatpkak is undefined - -- name: append to flatpkgs +- name: Append to pkg_flatpak + when: + - ansible_system == 'Linux' + notify: + - Depend flatpak + changed_when: true ansible.builtin.set_fact: - flatpkgs: "{{ flatpkgs + [ 'io.dbeaver.DBeaverCommunity' ] }}" - when: ansible_os_family != 'Darwin' + pkg_flatpak: "{{ pkg_flatpak + ['io.dbeaver.DBeaverCommunity'] }}" -- name: append to caskpkgs +- name: Append to pkg_cask + when: + - ansible_system == 'Darwin' ansible.builtin.set_fact: - caskpkgs: "{{ caskpkgs + [ 'dbeaver-community' ] }}" - when: ansible_os_family == 'Darwin' + pkg_cask: "{{ pkg_cask + ['dbeaver-community'] }}" diff --git a/tasks/pkgs/direnv.yml b/tasks/pkgs/direnv.yml new file mode 100644 index 0000000..67accf7 --- /dev/null +++ b/tasks/pkgs/direnv.yml @@ -0,0 +1,3 @@ +- name: Append to pkg_sys + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + ['direnv'] }}" diff --git a/tasks/pkgs/dockerls.yml b/tasks/pkgs/dockerls.yml index 84b7df5..b774028 100644 --- a/tasks/pkgs/dockerls.yml +++ b/tasks/pkgs/dockerls.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/nodejs.yml - when: nodejs is undefined - -- name: add to npmpkgs +- name: Add to pkg_npm + notify: + - Depend node + changed_when: true ansible.builtin.set_fact: - npmpkgs: "{{ npmpkgs + ['dockerfile-language-server-nodejs'] }}" + pkg_npm: "{{ pkg_npm + ['dockerfile-language-server-nodejs'] }}" diff --git a/tasks/pkgs/dotenv-linter.yml b/tasks/pkgs/dotenv-linter.yml index 00b3226..c4f6ffc 100644 --- a/tasks/pkgs/dotenv-linter.yml +++ b/tasks/pkgs/dotenv-linter.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: "pkgs/rust.yml" - when: pkgconfig_rust is undefined - -- name: add to cargopkgs +- name: Add to pkg_cargo + notify: + - Depend cargo + changed_when: true ansible.builtin.set_fact: - cargopkgs: "{{ cargopkgs + [ 'dotenv-linter' ] }}" + pkg_cargo: "{{ pkg_cargo + ['dotenv-linter'] }}" diff --git a/tasks/pkgs/duf.yml b/tasks/pkgs/duf.yml index e7a2c90..3d553ea 100644 --- a/tasks/pkgs/duf.yml +++ b/tasks/pkgs/duf.yml @@ -1,10 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: "pkgs/go.yml" - when: - - pkgconfig_go is undefined - -- name: append to gopkgs +- name: Append to pkg_go + notify: + - Depend go + changed_when: true ansible.builtin.set_fact: - gopkgs: "{{ gopkgs + [ 'github.com/muesli/duf@latest' ] }}" + pkg_go: "{{ pkg_go + ['github.com/muesli/duf@latest'] }}" diff --git a/tasks/pkgs/dust.yml b/tasks/pkgs/dust.yml index 0550922..89b9842 100644 --- a/tasks/pkgs/dust.yml +++ b/tasks/pkgs/dust.yml @@ -1,19 +1,16 @@ # vim: set filetype=yaml.ansible : --- -- name: append to syspkgs +- name: Linux specific install + when: + - ansible_system == 'Linux' + notify: + - Depend cargo + changed_when: true ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'dust' ] }}" + pkg_cargo: "{{ pkg_cargo + ['du-dust'] }}" + +- name: Append to pkg_sys when: - ansible_os_family == 'Darwin' - -- name: linux specific install - block: - - ansible.builtin.include_tasks: - file: "pkgs/rust.yml" - when: pkgconfig_rust is undefined - - - name: add to cargopkgs - ansible.builtin.set_fact: - cargopkgs: "{{ cargopkgs + [ 'du-dust' ] }}" - when: - - ansible_os_family != 'Darwin' + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + ['dust'] }}" diff --git a/tasks/pkgs/editorconfig.yml b/tasks/pkgs/editorconfig.yml index a1c9c50..3622ecd 100644 --- a/tasks/pkgs/editorconfig.yml +++ b/tasks/pkgs/editorconfig.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkgs ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'editorconfig' ] }}" + pkg_sys: "{{ pkg_sys + ['editorconfig'] }}" diff --git a/tasks/pkgs/eslint.yml b/tasks/pkgs/eslint.yml index 0d5626d..b529871 100644 --- a/tasks/pkgs/eslint.yml +++ b/tasks/pkgs/eslint.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/nodejs.yml - when: nodejs is undefined - -- name: add to npmpkgs +- name: Add to pkg_npm + notify: + - Depend node + changed_when: true ansible.builtin.set_fact: - npmpkgs: "{{ npmpkgs + ['vscode-langservers-extracted'] }}" + pkg_npm: "{{ pkg_npm + ['vscode-langservers-extracted'] }}" diff --git a/tasks/pkgs/eza.yml b/tasks/pkgs/eza.yml index a1436d3..f6bf6e1 100644 --- a/tasks/pkgs/eza.yml +++ b/tasks/pkgs/eza.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: "pkgs/rust.yml" - when: pkgconfig_rust is undefined - -- name: add to cargopkgs +- name: Add to pkg_cargo + notify: + - Depend cargo + changed_when: true ansible.builtin.set_fact: - cargopkgs: "{{ cargopkgs + [ 'eza' ] }}" + pkg_cargo: "{{ pkg_cargo + ['eza'] }}" diff --git a/tasks/pkgs/fd.yml b/tasks/pkgs/fd.yml index 799f842..9b534b1 100644 --- a/tasks/pkgs/fd.yml +++ b/tasks/pkgs/fd.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to syspkgs +- name: Append to pkg_sys ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig.fd.pkg[ansible_os_family] }}" + pkg_sys: "{{ pkg_sys + fd.pkgs }}" diff --git a/tasks/pkgs/firefox.yml b/tasks/pkgs/firefox.yml index c4096bb..0b86d43 100644 --- a/tasks/pkgs/firefox.yml +++ b/tasks/pkgs/firefox.yml @@ -1,11 +1,13 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkgs + when: + - ansible_system == 'Linux' ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'firefox' ] }}" - when: ansible_os_family != 'Darwin' + pkg_sys: "{{ pkg_sys + ['firefox'] }}" -- name: append to caskpkgs +- name: Append to pkg_cask + when: + - ansible_system == 'Darwin' ansible.builtin.set_fact: - caskpkgs: "{{ caskpkgs + [ 'firefox' ] }}" - when: ansible_os_family == 'Darwin' + pkg_cask: "{{ pkg_cask + ['firefox'] }}" diff --git a/tasks/pkgs/flatpak.yml b/tasks/pkgs/flatpak.yml index 8bfced9..9253dcb 100644 --- a/tasks/pkgs/flatpak.yml +++ b/tasks/pkgs/flatpak.yml @@ -1,7 +1,7 @@ # vim: set filetype=yaml.ansible : --- -- name: append to syspkgs +- name: Append to pkg_sys + when: + - ansible_system == 'Linux' ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'flatpak' ] }}" - flatpak: true - when: ansible_os_family != 'Darwin' + pkg_sys: "{{ pkg_sys + ['flatpak'] }}" diff --git a/tasks/pkgs/fzf.yml b/tasks/pkgs/fzf.yml index 5bd7e5c..ee9ea30 100644 --- a/tasks/pkgs/fzf.yml +++ b/tasks/pkgs/fzf.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkgs ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'fzf' ] }}" + pkg_sys: "{{ pkg_sys + ['fzf'] }}" diff --git a/tasks/pkgs/ghostty.yml b/tasks/pkgs/ghostty.yml index d4bd987..0a3f690 100644 --- a/tasks/pkgs/ghostty.yml +++ b/tasks/pkgs/ghostty.yml @@ -1,32 +1,40 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_vars: - file: ghostty.yml - name: _ghostty -- ansible.builtin.set_fact: - pkgconfig_ghostty: "{{ _ghostty | ansible.builtin.combine(pkgconfig.ghostty) }}" - -- name: ensure dependencies +- name: Source pkg installation + when: + - ghostty.method == 'src' + - ansible_distribution != 'MacOSX' block: - - ansible.builtin.include_tasks: - file: "pkgs/terra_repo.yml" - when: terrarepo is undefined - - - name: append to pkgs + - name: Build ghostty from source + notify: + - Depend zig + changed_when: true ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'ghostty' ] }}" - when: ansible_distribution == 'Fedora' or - not pkgconfig_ghostty.build + pkg_sys: "{{ pkg_sys + ghostty.deps }}" + pkg_src: "{{ pkg_src + ['ghostty'] }}" -- name: build ghostty from source - block: - - ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig_ghostty.deps[ansible_os_family] }}" - srcpkgs: "{{ srcpkgs + ['ghostty'] }}" - when: (ansible_distribution != 'Fedora' and ansible_system == 'Linux') or - pkgconfig_ghostty.build - -- name: append ghostty to caskpkgs +- name: Appimage installation + when: + - ghostty.method == 'appimage' + - ansible_distribution != 'MacOSX' ansible.builtin.set_fact: - caskpkgs: "{{ caskpkgs + [ 'ghostty' ] }}" - when: ansible_distribution == 'MacOSX' + pkg_appimage: "{{ pkg_appimage + ghostty_vars.appimage }}" + +- name: Sys pkg installation + when: + - ghostty.method == 'sys' + block: + - name: Append to pkgs + when: + - ansible_distribution == 'Fedora' + notify: + - Depend terra repo + changed_when: true + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + ['ghostty'] }}" + +- name: Cask pkg installation + when: + - ghostty.method == 'brew' + ansible.builtin.set_fact: + pkg_cask: "{{ pkg_cask + ['ghostty'] }}" diff --git a/tasks/pkgs/git.yml b/tasks/pkgs/git.yml index f07bf34..f5ec4a5 100644 --- a/tasks/pkgs/git.yml +++ b/tasks/pkgs/git.yml @@ -1,8 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.set_fact: - git: true - -- name: append to pkgs +- name: Append to pkgs ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig.git.pkgs[ansible_system] }}" + pkg_sys: "{{ pkg_sys + git.pkgs }}" diff --git a/tasks/pkgs/glow.yml b/tasks/pkgs/glow.yml index a95cb1f..0d0c3e5 100644 --- a/tasks/pkgs/glow.yml +++ b/tasks/pkgs/glow.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/go.yml - when: pkgconfig_go is undefined - -- name: add to gopkgs +- name: Add to pkg_go + notify: + - Depend go + changed_when: true ansible.builtin.set_fact: - gopkgs: "{{ gopkgs + ['github.com/charmbracelet/glow@latest'] }}" + pkg_go: "{{ pkg_go + ['github.com/charmbracelet/glow@latest'] }}" diff --git a/tasks/pkgs/go.yml b/tasks/pkgs/go.yml index 4526285..7431f03 100644 --- a/tasks/pkgs/go.yml +++ b/tasks/pkgs/go.yml @@ -1,11 +1,12 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_vars: - file: go.yml - name: _go -- ansible.builtin.set_fact: - pkgconfig_go: "{{ _go | ansible.builtin.combine(pkgconfig.go) }}" - -- name: append to pkgs +- name: Install from archive + when: + - go.method == 'archive' ansible.builtin.set_fact: - srcpkgs: "{{ srcpkgs + [ 'go' ] }}" + pkg_archive: "{{ pkg_archive + ['go'] }}" + +- name: Append to pkgs + - go.method != 'archive' + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + ['go'] }}" diff --git a/tasks/pkgs/godot.yml b/tasks/pkgs/godot.yml index c8071e7..42e0718 100644 --- a/tasks/pkgs/godot.yml +++ b/tasks/pkgs/godot.yml @@ -1,16 +1,16 @@ # vim: set filetype=yaml.ansible : --- -- block: - - ansible.builtin.include_tasks: - file: pkgs/flatpak.yml - when: flatpak is undefined - - name: append to flatpkgs - ansible.builtin.set_fact: - flatpkgs: "{{ flatpkgs + [ 'org.godotengine.Godot' ] }}" +- name: Append to pkg_flatpak when: - - ansible_os_family != 'Darwin' - -- name: append to caskpkgs + - ansible_system == 'Linux' + notify: + - Depend flatpak + changed_when: true ansible.builtin.set_fact: - caskpkgs: "{{ caskpkgs + [ 'godot' ] }}" - when: ansible_os_family == 'Darwin' + pkg_flatpak: "{{ pkg_flatpak + ['org.godotengine.Godot'] }}" + +- name: Append to pkg_cask + when: + - ansible_system == 'Darwin' + ansible.builtin.set_fact: + pkg_cask: "{{ pkg_cask + ['godot'] }}" diff --git a/tasks/pkgs/gopls.yml b/tasks/pkgs/gopls.yml index 0ba993b..34ef4d8 100644 --- a/tasks/pkgs/gopls.yml +++ b/tasks/pkgs/gopls.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/go.yml - when: pkgconfig_go is undefined - -- name: add to gopkgs +- name: Add to pkg_go + notify: + - Depend go + changed_when: true ansible.builtin.set_fact: - gopkgs: "{{ gopkgs + ['golang.org/x/tools/gopls@latest'] }}" + pkg_go: "{{ pkg_go + ['golang.org/x/tools/gopls@latest'] }}" diff --git a/tasks/pkgs/gping.yml b/tasks/pkgs/gping.yml index af0691f..9a26a35 100644 --- a/tasks/pkgs/gping.yml +++ b/tasks/pkgs/gping.yml @@ -1,19 +1,16 @@ # vim: set filetype=yaml.ansible : --- -- name: append to syspkgs +- name: Append to pkg_sys + when: + - ansible_system == 'Darwin' ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'gping' ] }}" - when: - - ansible_os_family == 'Darwin' + pkg_sys: "{{ pkg_sys + ['gping'] }}" -- name: linux specific - block: - - ansible.builtin.include_tasks: - file: "pkgs/rust.yml" - when: - - pkgconfig_rust is undefined - - - ansible.builtin.set_fact: - cargopkgs: "{{ cargopkgs + [ 'gping' ] }}" +- name: Append to pkg_cargo when: - - ansible_os_family != 'Darwin' + - ansible_system == 'Linux' + notify: + - Depend cargo + changed_when: true + ansible.builtin.set_fact: + pkg_cargo: "{{ pkg_cargo + ['gping'] }}" diff --git a/tasks/pkgs/hashicorp_repo.yml b/tasks/pkgs/hashicorp_repo.yml deleted file mode 100644 index 4309599..0000000 --- a/tasks/pkgs/hashicorp_repo.yml +++ /dev/null @@ -1,67 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -- ansible.builtin.set_fact: - hashicorp: true - -- name: RedHat repository - when: ansible_os_family == 'RedHat' - block: - - name: enable hashicorp repo for fedora >=41 - become: true - when: - - ansible_distribution == 'Fedora' - - ansible_distribution_major_version|int >= 41 - ansible.builtin.command: - creates: /etc/yum.repos.d/hashicorp.repo - cmd: "dnf config-manager addrepo --from-repofile={{ pkgconfig.hashicorp.Linux.Fedora.repo }}" - - - name: enable hashicorp repo for fedora <41 - become: true - when: - - ansible_distribution == 'Fedora' - - ansible_distribution_major_version|int < 41 - ansible.builtin.command: - creates: /etc/yum.repos.d/hashicorp.repo - cmd: "dnf config-manager --add-repo {{ pkgconfig.hashicorp.Linux.Fedora.repo }}" - - - name: enable hashicorp repo for RHEL like distribution - become: true - when: - - ansible_distribution != 'Fedora' - ansible.builtin.command: - creates: /etc/yum.repos.d/hashicorp.repo - cmd: "dnf config-manager --add-repo {{ pkgconfig.hashicorp.Linux.RedHat.repo }}" - -- name: Debian based repository - when: ansible_os_family == 'Debian' - block: - - ansible.builtin.tempfile: - state: directory - prefix: hashicorp. - register: d_hashicorp_tmp - - - name: get hashicorp archive gpg key - ansible.builtin.get_url: - dest: "{{ d_hashicorp_tmp.path }}/gpg" - url: https://apt.releases.hashicorp.com/gpg - - - name: install hashicorp archive gpg key - become: true - ansible.builtin.command: - cmd: - - gpg - - --dearmor - - -o - - /usr/share/keyrings/hashicorp-archive-keyring.gpg - - "{{ d_hashicorp_tmp.path }}/gpg" - - - name: enable hasicorp repo for debian - ansible.builtin.apt_repository: - repo: "{{ pkgconfig.hashicorp.Linux.Debian.repo }}" - state: present - update_cache: false - -- name: enable hashicorp homebrew tap - when: ansible_os_family == 'Darwin' - ansible.builtin.set_fact: - brewtaps: "{{ brewtaps + ['hashicorp/tap'] }}" diff --git a/tasks/pkgs/heroic.yml b/tasks/pkgs/heroic.yml index 347f0f0..b8080a6 100644 --- a/tasks/pkgs/heroic.yml +++ b/tasks/pkgs/heroic.yml @@ -1,16 +1,16 @@ # vim: set filetype=yaml.ansible : --- -- block: - - ansible.builtin.include_tasks: - file: pkgs/flatpak.yml - when: flatpak is undefined - - name: append to flatpkgs - ansible.builtin.set_fact: - flatpkgs: "{{ flatpkgs + [ 'com.heroicgameslauncher.hgl' ] }}" +- name: Append to pkg_flatpak when: - - ansible_os_family != 'Darwin' - -- name: append to caskpkgs + - ansible_system == 'Linux' + notify: + - Depend flatpak + changed_when: true ansible.builtin.set_fact: - caskpkgs: "{{ caskpkgs + [ 'heroic' ] }}" - when: ansible_os_family == 'Darwin' + pkg_flatpak: "{{ pkg_flatpak + ['com.heroicgameslauncher.hgl'] }}" + +- name: Append to pkg_cask + when: + - ansible_os_family == 'Darwin' + ansible.builtin.set_fact: + pkg_cask: "{{ pkg_cask + ['heroic'] }}" diff --git a/tasks/pkgs/htmlls.yml b/tasks/pkgs/htmlls.yml index 0d5626d..b529871 100644 --- a/tasks/pkgs/htmlls.yml +++ b/tasks/pkgs/htmlls.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/nodejs.yml - when: nodejs is undefined - -- name: add to npmpkgs +- name: Add to pkg_npm + notify: + - Depend node + changed_when: true ansible.builtin.set_fact: - npmpkgs: "{{ npmpkgs + ['vscode-langservers-extracted'] }}" + pkg_npm: "{{ pkg_npm + ['vscode-langservers-extracted'] }}" diff --git a/tasks/pkgs/htmx-lsp.yml b/tasks/pkgs/htmx-lsp.yml index cfb63cd..32a7506 100644 --- a/tasks/pkgs/htmx-lsp.yml +++ b/tasks/pkgs/htmx-lsp.yml @@ -1,9 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: "pkgs/rust.yml" - when: pkgconfig_rust is undefined - -- name: add to cargopkgs +- name: Add to pkg_cargo ansible.builtin.set_fact: - cargopkgs: "{{ cargopkgs + [ 'htmx-lsp' ] }}" + pkg_cargo: "{{ pkg_cargo + ['htmx-lsp'] }}" diff --git a/tasks/pkgs/httpie.yml b/tasks/pkgs/httpie.yml index 2f83325..d457a84 100644 --- a/tasks/pkgs/httpie.yml +++ b/tasks/pkgs/httpie.yml @@ -1,15 +1,16 @@ # vim: set filetype=yaml.ansible : --- -- block: - - ansible.builtin.include_tasks: - file: pkgs/flatpak.yml - when: flatpak is undefined - - - ansible.builtin.set_fact: - flatpkgs: "{{ flatpkgs + [ 'io.httpie.Httpie' ] }}" - when: ansible_os_family != 'Darwin' - -- name: append to caskpkgs +- name: Append to pkg_flatpak + when: + - ansible_system == 'Linux' + notify: + - Depend flatpak + changed_when: true ansible.builtin.set_fact: - caskpkgs: "{{ caskpkgs + [ 'httpie' ] }}" - when: ansible_os_family == 'Darwin' + pkg_flatpak: "{{ pkg_flatpak + [httpie.pkg] }}" + +- name: Append to pkg_cask + when: + - ansible_os_family == 'Darwin' + ansible.builtin.set_fact: + pkg_cask: "{{ pkg_cask + [httpie.pkg] }}" diff --git a/tasks/pkgs/hugo.yml b/tasks/pkgs/hugo.yml index 5adcc54..ca0ad61 100644 --- a/tasks/pkgs/hugo.yml +++ b/tasks/pkgs/hugo.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkgs ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'hugo' ] }}" + pkg_sys: "{{ pkg_sys + ['hugo'] }}" diff --git a/tasks/pkgs/hyperfine.yml b/tasks/pkgs/hyperfine.yml index 640aba3..1a393d5 100644 --- a/tasks/pkgs/hyperfine.yml +++ b/tasks/pkgs/hyperfine.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to syspkgs +- name: Append to pkg_sys ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'hyperfine' ] }}" + pkg_sys: "{{ pkg_sys + ['hyperfine'] }}" diff --git a/tasks/pkgs/intelephense.yml b/tasks/pkgs/intelephense.yml index d22c871..cbfcc8d 100644 --- a/tasks/pkgs/intelephense.yml +++ b/tasks/pkgs/intelephense.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/nodejs.yml - when: nodejs is undefined - -- name: add to npmpkgs +- name: Add to pkg_npm + notify: + - Depend node + changed_when: true ansible.builtin.set_fact: - npmpkgs: "{{ npmpkgs + [ 'intelephense' ] }}" + pkg_npm: "{{ pkg_npm + ['intelephense'] }}" diff --git a/tasks/pkgs/jinja-lsp.yml b/tasks/pkgs/jinja-lsp.yml index ff9c2af..d983665 100644 --- a/tasks/pkgs/jinja-lsp.yml +++ b/tasks/pkgs/jinja-lsp.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: "pkgs/rust.yml" - when: pkgconfig_rust is undefined - -- name: add to cargopkgs +- name: Add to pkg_cargo + notify: + - Depend cargo + changed_when: true ansible.builtin.set_fact: - cargopkgs: "{{ cargopkgs + [ 'jinja-lsp' ] }}" + pkg_cargo: "{{ pkg_cargo + ['jinja-lsp'] }}" diff --git a/tasks/pkgs/jq.yml b/tasks/pkgs/jq.yml index c8e05e9..4911305 100644 --- a/tasks/pkgs/jq.yml +++ b/tasks/pkgs/jq.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkgs ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'jq' ] }}" + pkg_sys: "{{ pkg_sys + ['jq'] }}" diff --git a/tasks/pkgs/jsonls.yml b/tasks/pkgs/jsonls.yml index 0d5626d..b529871 100644 --- a/tasks/pkgs/jsonls.yml +++ b/tasks/pkgs/jsonls.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/nodejs.yml - when: nodejs is undefined - -- name: add to npmpkgs +- name: Add to pkg_npm + notify: + - Depend node + changed_when: true ansible.builtin.set_fact: - npmpkgs: "{{ npmpkgs + ['vscode-langservers-extracted'] }}" + pkg_npm: "{{ pkg_npm + ['vscode-langservers-extracted'] }}" diff --git a/tasks/pkgs/kitty.yml b/tasks/pkgs/kitty.yml index 9988f12..a814194 100644 --- a/tasks/pkgs/kitty.yml +++ b/tasks/pkgs/kitty.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: add to syspkgs +- name: Add to pkg_sys ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig.kitty.pkgs[ansible_system] }}" + pkg_sys: "{{ pkg_sys + kitty.pkgs }}" diff --git a/tasks/pkgs/lazygit.yml b/tasks/pkgs/lazygit.yml index de3ab98..750e785 100644 --- a/tasks/pkgs/lazygit.yml +++ b/tasks/pkgs/lazygit.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/go.yml - when: pkgconfig_go is undefined - -- name: add to gopkgs +- name: Add to pkg_go + notify: + - Depend go + changed_when: true ansible.builtin.set_fact: - gopkgs: "{{ gopkgs + ['github.com/jesseduffield/lazygit@latest'] }}" + pkg_go: "{{ pkg_go + ['github.com/jesseduffield/lazygit@latest'] }}" diff --git a/tasks/pkgs/libreoffice.yml b/tasks/pkgs/libreoffice.yml index d8afbd4..9cafca3 100644 --- a/tasks/pkgs/libreoffice.yml +++ b/tasks/pkgs/libreoffice.yml @@ -1,30 +1,19 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_vars: - file: libreoffice.yml - name: _libreoffice -- ansible.builtin.set_fact: - pkgconfig_libreoffice: "{{ _libreoffice | ansible.builtin.combine(pkgconfig.libreoffice) }}" - -- block: - - ansible.builtin.include_tasks: - file: pkgs/flatpak.yml - when: flatpak is undefined - - name: append to flatpkgs - ansible.builtin.set_fact: - flatpkgs: "{{ flatpkgs + pkgconfig_libreoffice.flatpak }}" +- name: Append to pkg_flatpak when: - - ansible_os_family != 'Darwin' - - pkgconfig_libreoffice.use_flatpak - -- block: - - ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig_libreoffice[ansible_os_family] }}" - when: - - ansible_os_family != 'Darwin' - - not pkgconfig_libreoffice.use_flatpak - -- name: append to caskpkgs + - libreoffice.method == 'flatpak' ansible.builtin.set_fact: - caskpkgs: "{{ caskpkgs + [ 'libreoffice' ] }}" - when: ansible_os_family == 'Darwin' + pkg_flatpak: "{{ pkg_flatpak + [libreoffice.flatpak] }}" + +- name: Append to pkg_sys + when: + - libreoffice.method == 'sys' + ansible.builtin.set_fact: + sys_pkg: "{{ sys_pkg + libreoffice.pkgs }}" + +- name: Append to caskpkgs + when: + - libreoffice.method == 'cask' + ansible.builtin.set_fact: + pkg_cask: "{{ pkg_cask + libreoffice.pkgs }}" diff --git a/tasks/pkgs/lua-language-server.yml b/tasks/pkgs/lua-language-server.yml index a981c35..b64bb6d 100644 --- a/tasks/pkgs/lua-language-server.yml +++ b/tasks/pkgs/lua-language-server.yml @@ -1,11 +1,13 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_vars: - file: lua-language-server.yml - name: _luals -- ansible.builtin.set_fact: - pkgconfig_luals: "{{ _luals | ansible.builtin.combine(pkgconfig.luals) }}" - -- name: append to pkgs +- name: Append to pkgs + when: + - ansible_system == 'Linux' ansible.builtin.set_fact: - srcpkgs: "{{ srcpkgs + [ 'lua-language-server' ] }}" + pkg_archive: "{{ pkg_archive + ['luals'] }}" + +- name: Append to pkg_sys + when: + - ansible_system == 'Darwin' + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + ['lua-language-server'] }}" diff --git a/tasks/pkgs/markdownlint-cli.yml b/tasks/pkgs/markdownlint-cli.yml index 06e13de..978e3a9 100644 --- a/tasks/pkgs/markdownlint-cli.yml +++ b/tasks/pkgs/markdownlint-cli.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/nodejs.yml - when: nodejs is undefined - -- name: add to npmpkgs +- name: Add to pkg_npm + notify: + - Depend node + changed_when: true ansible.builtin.set_fact: - npmpkgs: "{{ npmpkgs + ['markdownlint-cli'] }}" + pkg_npm: "{{ pkg_npm + ['markdownlint-cli'] }}" diff --git a/tasks/pkgs/mcfly.yml b/tasks/pkgs/mcfly.yml index 78fdadd..a90770e 100644 --- a/tasks/pkgs/mcfly.yml +++ b/tasks/pkgs/mcfly.yml @@ -1,19 +1,13 @@ # vim: set filetype=yaml.ansible : --- -- name: append to syspkgs - ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'mcfly' ] }}" +- name: Append to pkg_sys when: - ansible_os_family == 'Darwin' + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + ['mcfly'] }}" -- name: linux specific install - block: - - ansible.builtin.include_tasks: - file: "pkgs/rust.yml" - when: pkgconfig_rust is undefined - - - name: add to cargopkgs - ansible.builtin.set_fact: - cargopkgs: "{{ cargopkgs + [ 'mcfly' ] }}" +- name: Add to pkg_cargo when: - - ansible_os_family != 'Darwin' + - ansible_system == 'Linux' + ansible.builtin.set_fact: + pkg_cargo: "{{ pkg_cargo + ['mcfly'] }}" diff --git a/tasks/pkgs/neovide.yml b/tasks/pkgs/neovide.yml index 3b2360b..ba42265 100644 --- a/tasks/pkgs/neovide.yml +++ b/tasks/pkgs/neovide.yml @@ -1,21 +1,17 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_vars: - file: neovide.yml - name: _neovide -- ansible.builtin.set_fact: - pkgconfig_neovide: "{{ _neovide | ansible.builtin.combine(pkgconfig.neovide) }}" -- ansible.builtin.include_tasks: - file: pkgs/rust.yml - when: pkgconfig_rust is undefined - -- name: append to pkgs +- name: Append to pkgs + when: + - ansible_system == 'Linux' + notify: + - Depend cargo + changed_when: true ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig_neovide.deps[ansible_os_family] }}" - srcpkgs: "{{ srcpkgs + [ 'neovide' ] }}" - when: ansible_system == 'Linux' + pkg_sys: "{{ pkg_sys + neovide.deps }}" + pkg_cargo: "{{ pkg_cargo + [neovide] }}" -- name: append neovide to caskpkgs +- name: Append neovide to pkg_cask + when: + - ansible_system == 'Darwin' ansible.builtin.set_fact: - caskpkgs: "{{ caskpkgs + [ 'neovide' ] }}" - when: ansible_system == 'Darwin' + pkg_cask: "{{ pkg_cask + ['neovide'] }}" diff --git a/tasks/pkgs/neovim.yml b/tasks/pkgs/neovim.yml index d5553f0..77191b7 100644 --- a/tasks/pkgs/neovim.yml +++ b/tasks/pkgs/neovim.yml @@ -1,17 +1,13 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_vars: - file: neovim.yml - name: _neovim -- ansible.builtin.set_fact: - pkgconfig_neovim: "{{ _neovim | ansible.builtin.combine(pkgconfig.neovim) }}" - -- name: append neovim to srcpkgs +- name: Append to appimages + when: + - neovim.method == 'appimage' ansible.builtin.set_fact: - srcpkgs: "{{ srcpkgs + ['neovim'] }}" - when: not pkgconfig_neovim.use_syspkg + pkg_appimage: "{{ pkg_appimage + ['neovim'] }}" -- name: append neovim to syspkgs +- name: Append neovim to pkg_sys + when: + - neovim.method == 'sys' ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + ['neovim'] }}" - when: pkgconfig_neovim.use_syspkg + pkg_sys: "{{ pkg_sys + ['neovim'] }}" diff --git a/tasks/pkgs/nerdfonts.yml b/tasks/pkgs/nerdfonts.yml index 287fe39..78a2548 100644 --- a/tasks/pkgs/nerdfonts.yml +++ b/tasks/pkgs/nerdfonts.yml @@ -1,20 +1,16 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_vars: - file: nerdfonts.yml - name: _nerdfonts -- ansible.builtin.set_fact: - pkgconfig_nerdfonts: "{{ _nerdfonts | ansible.builtin.combine(pkgconfig.nerdfonts) }}" - -- name: append to srcpkgs +- name: Append to srcpkgs + when: + - ansible_system == 'Linux' ansible.builtin.set_fact: - srcpkgs: "{{ srcpkgs + [ 'nerdfonts' ] }}" - when: ansible_system == 'Linux' + pkg_archive: "{{ pkg_archive + ['nerdfonts'] }}" -- name: append to caskpkgs - ansible.builtin.set_fact: - caskpkgs: "{{ caskpkgs + [ pkgconfig_nerdfonts.fonts[font].brew ] }}" - loop: "{{ pkgconfig_nerdfonts.install }}" +- name: Append to caskpkgs + when: + - ansible_system == 'Darwin' + loop: "{{ nerdfonts.fonts }}" loop_control: loop_var: font - when: ansible_system == 'Darwin' + ansible.builtin.set_fact: + pkg_cask: "{{ pkg_cask + [pkgconfig.nerdfonts.fonts[font].brew] }}" diff --git a/tasks/pkgs/nextcloud.yml b/tasks/pkgs/nextcloud.yml index 4ec2c47..8b0a9de 100644 --- a/tasks/pkgs/nextcloud.yml +++ b/tasks/pkgs/nextcloud.yml @@ -1,17 +1,24 @@ # vim: set filetype=yaml.ansible : --- -- name: append to flatpkgs - block: - - ansible.builtin.include_tasks: - file: pkgs/flatpak.yml - when: flatpak is undefined - - - ansible.builtin.set_fact: - flatpkgs: "{{ flatpkgs + [ 'com.nextcloud.desktopclient.nextcloud' ] }}" +- name: Append to pkg_Flatpak when: - - ansible_os_family != 'Darwin' - -- name: append to caskpkgs + - ansible_system == 'Linux' + - nextcloud.method == 'flatpak' + notify: + - Depend flatpak + changed_when: true ansible.builtin.set_fact: - caskpkgs: "{{ caskpkgs + [ 'nextcloud' ] }}" - when: ansible_os_family == 'Darwin' + pkg_flatpak: "{{ pkg_flatpak + [nextcloud] }}" + +- name: Append to pkg_sys + when: + - ansible_system == 'Linux' + - nextcloud.method == 'sys' + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + ['nextcloud'] }}" + +- name: Append to pkg_cask + when: + - ansible_os_family == 'Darwin' + ansible.builtin.set_fact: + pkg_cask: "{{ pkg_cask + ['nextcloud'] }}" diff --git a/tasks/pkgs/nginxls.yml b/tasks/pkgs/nginxls.yml index 428f990..844322c 100644 --- a/tasks/pkgs/nginxls.yml +++ b/tasks/pkgs/nginxls.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/pipx.yml - when: pipx is undefined - -- name: add to pipxpkgs +- name: Add to pkg_pipx + notify: + - Depend node + changed_when: true ansible.builtin.set_fact: - pipxpkgs: "{{ pipxpkgs + ['nginx-language-server'] }}" + pkg_pipx: "{{ pkg_pipx + ['nginx-language-server'] }}" diff --git a/tasks/pkgs/nodejs.yml b/tasks/pkgs/nodejs.yml index 34a2d51..4ee1ac1 100644 --- a/tasks/pkgs/nodejs.yml +++ b/tasks/pkgs/nodejs.yml @@ -1,8 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.set_fact: - nodejs: true - -- name: append to pkgs +- name: Append to pkgs ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig.nodejs.pkgs[ansible_system] }}" + pkg_sys: "{{ pkg_sys + nodejs.pkgs }}" diff --git a/tasks/pkgs/nomad.yml b/tasks/pkgs/nomad.yml index b173d26..f353659 100644 --- a/tasks/pkgs/nomad.yml +++ b/tasks/pkgs/nomad.yml @@ -1,11 +1,19 @@ # vim: set filetype=yaml.ansible : --- -- name: ensure hashicorp repo is active - ansible.builtin.include_tasks: - file: "pkgs/hashicorp_repo.yml" - when: hashicorp is undefined - -- name: append to pkgs +- name: Append to pkg_tap + when: + - ansible_distribution == 'MacOSX' + notify: + - Depend hashicorp repo + changed_when: true ansible.builtin.set_fact: - tappkgs: "{{ tappkgs + [ pkgconfig.nomad[ansible_system] ] }}" + pkg_tap: "{{ pkg_tap + nomad.pkgs }}" +- name: Append to pkg_sys + when: + - ansible_system == 'Linux' + notify: + - Depend hashicorp repo + changed_when: true + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + nomad.pkgs }}" diff --git a/tasks/pkgs/nushell.yml b/tasks/pkgs/nushell.yml deleted file mode 100644 index 332843e..0000000 --- a/tasks/pkgs/nushell.yml +++ /dev/null @@ -1,26 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -- ansible.builtin.include_vars: - file: nushell.yml - name: _nushell -- ansible.builtin.set_fact: - pkgconfig_nushell: "{{ _nushell | ansible.builtin.combine(pkgconfig.nushell) }}" - -- ansible.builtin.include_tasks: - file: pkgs/rust.yml - when: pkgconfig_rust is undefined - -- ansible.builtin.include_tasks: - file: pkgs/carapace.yml - when: pkgconfig_carapace is undefined - -- name: append to pkgs - ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig_nushell.deps[ansible_os_family] }}" - cargopkgs: "{{ cargopkgs + pkgconfig_nushell.pkgs[ansible_os_family] }}" - -- name: add nushell extras - ansible.builtin.set_fact: - cargopkgs: "{{ cargopkgs + pkgconfig_nushell.nupkgs_extra }}" - when: - pkgconfig_nushell.install_extra diff --git a/tasks/pkgs/packer.yml b/tasks/pkgs/packer.yml index bb8e779..7030445 100644 --- a/tasks/pkgs/packer.yml +++ b/tasks/pkgs/packer.yml @@ -1,10 +1,16 @@ # vim: set filetype=yaml.ansible : --- -- name: ensure hashicorp repo is active - ansible.builtin.include_tasks: - file: "pkgs/hashicorp_repo.yml" - when: hashicorp is undefined - -- name: append to pkgs +- name: Append to pkg_tap + when: + - ansible_system == 'Darwin' ansible.builtin.set_fact: - tappkgs: "{{ tappkgs + [ pkgconfig.packer[ansible_system] ] }}" + pkg_tap: "{{ pkg_tap + packer.pkgs }}" + +- name: Append to pkg_sys + when: + - ansible_system == 'Linux' + notify: + - Depend hashicorp repo + changed_when: true + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + packer.pkgs }}" diff --git a/tasks/pkgs/pandoc.yml b/tasks/pkgs/pandoc.yml index e148a03..8da3c55 100644 --- a/tasks/pkgs/pandoc.yml +++ b/tasks/pkgs/pandoc.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkgs ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'pandoc' ] }}" + pkg_sys: "{{ pkg_sys + ['pandoc'] }}" diff --git a/tasks/pkgs/pgadmin.yml b/tasks/pkgs/pgadmin.yml index b74f8f8..7df7ac8 100644 --- a/tasks/pkgs/pgadmin.yml +++ b/tasks/pkgs/pgadmin.yml @@ -1,16 +1,16 @@ # vim: set filetype=yaml.ansible : --- -- block: - - ansible.builtin.include_tasks: - file: pkgs/flatpak.yml - when: flatpak is undefined +- name: Append to pkg_flatpak + when: + - pgadmin.method == 'flatpak' + notify: + - Depend flatpak + changed_when: true + ansible.builtin.set_fact: + pkg_flatpak: "{{ pkg_flatpak + [pgadmin.flatpak] }}" - - name: append to syspkgs - ansible.builtin.set_fact: - flatpkgs: "{{ flatpkgs + [ 'org.pgadmin.pgadmin4'] }}" - when: ansible_os_family != 'Darwin' - -- name: append to caskpkgs - set_fact: - caskpkgs: "{{ caskpkgs + [ 'pgadmin4' ] }}" - when: ansible_os_family == 'Darwin' +- name: Append to pkg_cask + when: + - pgadmin.method == 'cask' + ansible.builtin.set_fact: + pkg_cask: "{{ pkg_cask + pgadmin.pkgs }}" diff --git a/tasks/pkgs/pipx.yml b/tasks/pkgs/pipx.yml index 8c353c1..dcfe774 100644 --- a/tasks/pkgs/pipx.yml +++ b/tasks/pkgs/pipx.yml @@ -1,7 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.set_fact: - pipx: true -- name: append to pkgs +- name: Append to pkgs ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'pipx' ] }}" + pkg_sys: "{{ pkg_sys + ['pipx'] }}" diff --git a/tasks/pkgs/podman.yml b/tasks/pkgs/podman.yml index dab91e8..7183e96 100644 --- a/tasks/pkgs/podman.yml +++ b/tasks/pkgs/podman.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkg_sys ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'podman' ] }}" + pkg_sys: "{{ pkg_sys + ['podman'] }}" diff --git a/tasks/pkgs/pyright.yml b/tasks/pkgs/pyright.yml index 45ff31e..4269cf5 100644 --- a/tasks/pkgs/pyright.yml +++ b/tasks/pkgs/pyright.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/pipx.yml - when: pipx is undefined - -- name: add to pipxpkgs +- name: Add to pkg_pipx + notify: + - Depend pipx + changed_when: true ansible.builtin.set_fact: - pipxpkgs: "{{ pipxpkgs + ['pyright'] }}" + pkg_pipx: "{{ pkg_pipx + ['pyright'] }}" diff --git a/tasks/pkgs/python3-pip.yml b/tasks/pkgs/python3-pip.yml deleted file mode 100644 index d568f87..0000000 --- a/tasks/pkgs/python3-pip.yml +++ /dev/null @@ -1,8 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -- ansible.builtin.set_fact: - python3: true - -- name: append to pkgs - ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig.python3.pkgs[ansible_system] }}" diff --git a/tasks/pkgs/python3.yml b/tasks/pkgs/python3.yml new file mode 100644 index 0000000..f784fb4 --- /dev/null +++ b/tasks/pkgs/python3.yml @@ -0,0 +1,5 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Append to pkgs + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + python3.pkgs }}" diff --git a/tasks/pkgs/quobix-vacuum.yml b/tasks/pkgs/quobix-vacuum.yml index 2e9ba17..291b8a5 100644 --- a/tasks/pkgs/quobix-vacuum.yml +++ b/tasks/pkgs/quobix-vacuum.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/nodejs.yml - when: nodejs is undefined - -- name: add to npmpkgs +- name: Add to pkg_npm + notify: + - Depend node + changed_when: true ansible.builtin.set_fact: - npmpkgs: "{{ npmpkgs + ['@quobix/vacuum'] }}" + pkg_npm: "{{ pkg_npm + ['@quobix/vacuum'] }}" diff --git a/tasks/pkgs/revive.yml b/tasks/pkgs/revive.yml index 468bf30..b5e228c 100644 --- a/tasks/pkgs/revive.yml +++ b/tasks/pkgs/revive.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/go.yml - when: pkgconfig_go is undefined - -- name: add to gopkgs +- name: Add to pkg_go + notify: + - Depend go + changed_when: true ansible.builtin.set_fact: - gopkgs: "{{ gopkgs + ['github.com/mgechev/revive@latest'] }}" + pkg_go: "{{ pkg_go + ['github.com/mgechev/revive@latest'] }}" diff --git a/tasks/pkgs/ripgrep.yml b/tasks/pkgs/ripgrep.yml index 06f6d60..8edeef5 100644 --- a/tasks/pkgs/ripgrep.yml +++ b/tasks/pkgs/ripgrep.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkg_sys ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'ripgrep' ] }}" + pkg_sys: "{{ pkg_sys + ['ripgrep'] }}" diff --git a/tasks/pkgs/rust.yml b/tasks/pkgs/rust.yml index 8562078..6ee7716 100644 --- a/tasks/pkgs/rust.yml +++ b/tasks/pkgs/rust.yml @@ -1,11 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_vars: - file: rust.yml - name: _rust -- ansible.builtin.set_fact: - pkgconfig_rust: "{{ _rust | ansible.builtin.combine(pkgconfig.rust) }}" - -- name: append to pkgs +- name: Append to pkgs ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig_rust.pkgs[ansible_system] }}" + pkg_sys: "{{ pkg_sys + rust.pkgs }}" diff --git a/tasks/pkgs/sd.yml b/tasks/pkgs/sd.yml index 3260e36..058a056 100644 --- a/tasks/pkgs/sd.yml +++ b/tasks/pkgs/sd.yml @@ -1,19 +1,16 @@ # vim: set filetype=yaml.ansible : --- -- name: append to syspkgs +- name: Append to pkg_sys + when: + - ansible_system == 'Darwin' ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'sd' ] }}" - when: - - ansible_os_family == 'Darwin' + pkg_sys: "{{ pkg_sys + ['sd'] }}" -- name: linux specific install - block: - - ansible.builtin.include_tasks: - file: "pkgs/rust.yml" - when: pkgconfig_rust is undefined - - - name: add to cargopkgs - ansible.builtin.set_fact: - cargopkgs: "{{ cargopkgs + [ 'sd' ] }}" +- name: Add to pkg_cargo when: - - ansible_os_family != 'Darwin' + - ansible_system == 'Linux' + notify: + - Depend cargo + changed_when: true + ansible.builtin.set_fact: + pkg_cargo: "{{ pkg_cargo + ['sd'] }}" diff --git a/tasks/pkgs/sqlfluff.yml b/tasks/pkgs/sqlfluff.yml index 3d406a2..9199abf 100644 --- a/tasks/pkgs/sqlfluff.yml +++ b/tasks/pkgs/sqlfluff.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/pipx.yml - when: pipx is undefined - -- name: add to pipxpkgs +- name: Add to pkg_pipx + notify: + - Depend pipx + changed_when: true ansible.builtin.set_fact: - pipxpkgs: "{{ pipxpkgs + ['sqlfluff'] }}" + pkg_pipx: "{{ pkg_pipx + ['sqlfluff'] }}" diff --git a/tasks/pkgs/sqlls.yml b/tasks/pkgs/sqlls.yml index f2e738d..745823a 100644 --- a/tasks/pkgs/sqlls.yml +++ b/tasks/pkgs/sqlls.yml @@ -1,10 +1,8 @@ # vim: filetype=yaml.ansible : --- -- name: Use nodejs - ansible.builtin.include_tasks: - file: pkgs/nodejs.yml - when: nodejs is undefined - -- name: Add to npmpkgs +- name: Add to pkg_npm + notify: + - Depend node + changed_when: true ansible.builtin.set_fact: - npmpkgs: "{{ npmpkgs + ['sql-language-server'] }}" + pkg_npm: "{{ pkg_npm + ['sql-language-server'] }}" diff --git a/tasks/pkgs/starship.yml b/tasks/pkgs/starship.yml index 1998605..1c8272a 100644 --- a/tasks/pkgs/starship.yml +++ b/tasks/pkgs/starship.yml @@ -1,10 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- name: install rust and cargo - ansible.builtin.include_tasks: - file: "pkgs/rust.yml" - when: pkgconfig_rust is undefined - -- name: add to cargopkgs +- name: Add to pkg_cargo + notify: + - Depend cargo + changed_when: true ansible.builtin.set_fact: - cargopkgs: "{{ cargopkgs + [ 'starship' ] }}" + pkg_cargo: "{{ pkg_cargo + ['starship'] }}" diff --git a/tasks/pkgs/stow.yml b/tasks/pkgs/stow.yml index 556cbe6..52257a3 100644 --- a/tasks/pkgs/stow.yml +++ b/tasks/pkgs/stow.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkg_sys ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'stow' ] }}" + pkg_sys: "{{ pkg_sys + ['stow'] }}" diff --git a/tasks/pkgs/tailscale.yml b/tasks/pkgs/tailscale.yml index 3149f0e..3a710d3 100644 --- a/tasks/pkgs/tailscale.yml +++ b/tasks/pkgs/tailscale.yml @@ -1,58 +1,65 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.set_fact: - tailscale: true -- name: enable for linux +- name: Enable for linux + when: + - ansible_system == 'Linux' block: - - name: enable for RedHat distros + - name: Enable for RedHat distros + when: + - ansible_os_family == 'RedHat' block: - - name: fedora >=41 + - name: Fedora >=41 ansible.builtin.command: creates: /etc/yum.repos.d/tailscale.repo - cmd: "dnf config-manager addrepo --from-repofile={{ pkgconfig.tailscale.url_base }}/fedora/tailscale.repo" + cmd: "dnf config-manager addrepo --from-repofile={{ tailscale.url_base }}/fedora/tailscale.repo" become: true when: - ansible_distribution == 'Fedora' - ansible_distribution_major_version|int >= 41 - - name: fedora <41 + - name: Fedora <41 ansible.builtin.command: creates: /etc/yum.repos.d/tailscale.repo - cmd: "dnf config-manager --add-repo {{ pkgconfig.tailscale.url_base }}/fedora/tailscale.repo" + cmd: "dnf config-manager --add-repo {{ tailscale.url_base }}/fedora/tailscale.repo" become: true when: - ansible_distribution == 'Fedora' - ansible_distribution_major_version|int < 41 - - name: rhel based distros + - name: Rhel based distros ansible.builtin.command: creates: /etc/yum.repos.d/tailscale.repo - cmd: "dnf config-manager --add-repo {{ pkgconfig.tailscale.url_base }}/rhel/{{ ansible_os_major_version }}/tailscale.repo" + cmd: "dnf config-manager --add-repo {{ tailscale.url_base }}/rhel/{{ ansible_os_major_version }}/tailscale.repo" become: true when: - ansible_distribution != 'Fedora' - when: ansible_os_family == 'RedHat' - - name: enable for Debian distros + - name: Enable for Debian distros + when: + - ansible_os_family == 'Debian' block: - - name: install tailscale keyring + - name: Install tailscale keyring block: - - ansible.builtin.get_url: - url: "{{ pkgconfig.tailscale.url_base }}/debian/{{ pkgconfig.tailscale.release[ansible_os_release].gpg }}" + - name: Get tailscal keyring + become: "{{ sys_pkg_become }}" + ansible.builtin.get_url: + url: "{{ tailscale.url_base }}/debian/{{ tailscale.release.gpg }}" dest: /usr/share/keyrings/tailscale-archive-keyring.gpg - become: true - - ansible.builtin.get_url: - url: "{{ pkgconfig.tailscale.url_base }}/debian/{{ pkgconfig.tailscale.release[ansible_os_release].list }}" + mode: '0644' + + - name: Get tailscale repo list + become: "{{ sys_pkg_become }}" + ansible.builtin.get_url: + url: "{{ tailscale.url_base }}/debian/{{ tailscale.release.list }}" dest: /etc/apt/sources.list.d/tailscale.list - become: true - when: ansible_os_family == 'Debian' + mode: '0644' - - name: append to syspkgs + - name: Append to pkg_sys ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'tailscale' ] }}" - when: ansible_os_family != 'Darwin' + pkg_sys: "{{ pkg_sys + ['tailscale'] }}" -- name: append to caskpkgs - set_fact: - caskpkgs: "{{ caskpkgs + [ 'tailscale' ] }}" - when: ansible_os_family == 'Darwin' +- name: Append to pkg_cask + when: + - ansible_system == 'Darwin' + ansible.builtin.set_fact: + pkg_cask: "{{ pkg_cask + ['tailscale'] }}" diff --git a/tasks/pkgs/tailwindcss-languageserver.yml b/tasks/pkgs/tailwindcss-languageserver.yml index f04ec3b..04f47b6 100644 --- a/tasks/pkgs/tailwindcss-languageserver.yml +++ b/tasks/pkgs/tailwindcss-languageserver.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/nodejs.yml - when: nodejs is undefined - -- name: add to npmpkgs +- name: Add to pkg_npm + notify: + - Depend node + changed_when: true ansible.builtin.set_fact: - npmpkgs: "{{ npmpkgs + ['@tailwindcss/language-server'] }}" + pkg_npm: "{{ pkg_npm + ['@tailwindcss/language-server'] }}" diff --git a/tasks/pkgs/templ.yml b/tasks/pkgs/templ.yml index ef6f9e2..23dd68f 100644 --- a/tasks/pkgs/templ.yml +++ b/tasks/pkgs/templ.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/go.yml - when: pkgconfig_go is undefined - -- name: add to gopkgs +- name: Add to pkg_go + notify: + - Depend go + changed_when: true ansible.builtin.set_fact: - gopkgs: "{{ gopkgs + ['github.com/a-h/templ/cmd/templ@latest'] }}" + pkg_go: "{{ pkg_go + ['github.com/a-h/templ/cmd/templ@latest'] }}" diff --git a/tasks/pkgs/terraform.yml b/tasks/pkgs/terraform.yml index 6880561..946eb53 100644 --- a/tasks/pkgs/terraform.yml +++ b/tasks/pkgs/terraform.yml @@ -1,10 +1,21 @@ # vim: set filetype=yaml.ansible : --- -- name: ensure hashicorp repo is active - ansible.builtin.include_tasks: - file: "pkgs/hashicorp_repo.yml" - when: hashicorp is undefined +- name: Append to pkgs + block: + - name: MacOSX specific + when: + - ansible_distribution == 'MacOSX' + notify: + - Depend hashicorp repo + changed_when: true + ansible.builtin.set_fact: + pkg_tap: "{{ pkg_tap + terraform.pkgs }}" -- name: append to pkgs - ansible.builtin.set_fact: - tappkgs: "{{ tappkgs + [ pkgconfig.terraform[ansible_system] ] }}" + - name: Linux specific + when: + - ansible_system == 'Linux' + notify: + - Depend hashicorp repo + changed_when: true + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + terraform.pkgs }}" diff --git a/tasks/pkgs/terraformls.yml b/tasks/pkgs/terraformls.yml index e3477c3..e804669 100644 --- a/tasks/pkgs/terraformls.yml +++ b/tasks/pkgs/terraformls.yml @@ -1,10 +1,21 @@ # vim: set filetype=yaml.ansible : --- -- name: ensure hashicorp repo is active - ansible.builtin.include_tasks: - file: "pkgs/hashicorp_repo.yml" - when: hashicorp is undefined +- name: Append to pkgs + block: + - name: MacOS specific + when: + - ansible_system == 'Darwin' + notify: + - Depend hashicorp repo + changed_when: true + ansible.builtin.set_fact: + pkg_tap: "{{ pkg_tap + terraformls.pkgs }}" -- name: append to pkgs - ansible.builtin.set_fact: - tappkgs: "{{ tappkgs + [ pkgconfig.terraformls[ansible_system] ] }}" + - name: Linux specific + when: + - ansible_system == 'Linux' + notify: + - Depend hashicorp repo + changed_when: true + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + terraformls.pkgs }}" diff --git a/tasks/pkgs/thunderbird.yml b/tasks/pkgs/thunderbird.yml index 71ef48b..9fa2bdb 100644 --- a/tasks/pkgs/thunderbird.yml +++ b/tasks/pkgs/thunderbird.yml @@ -1,11 +1,13 @@ # vim: set filetype=yaml.ansible : --- -- name: append to syspkgs - set_fact: - syspkgs: "{{ syspkgs + [ 'thunderbird' ] }}" - when: ansible_os_family != 'Darwin' +- name: Append to pkg_sys + when: + - ansible_system == 'Linux' + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + ['thunderbird'] }}" -- name: append to caskpkgs - set_fact: - caskpkgs: "{{ caskpkgs + [ 'thunderbird' ] }}" - when: ansible_os_family == 'Darwin' +- name: Append to pkg_cask + when: + - ansible_system == 'Darwin' + ansible.builtin.set_fact: + pkg_cask: "{{ pkg_cask + ['thunderbird'] }}" diff --git a/tasks/pkgs/tidy.yml b/tasks/pkgs/tidy.yml index dd0e7b4..4404779 100644 --- a/tasks/pkgs/tidy.yml +++ b/tasks/pkgs/tidy.yml @@ -1,8 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.set_fact: - tidy: true - -- name: append to pkgs +- name: Append to pkg_sys ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig.tidy.pkgs[ansible_system] }}" + pkg_sys: "{{ pkg_sys + tidy.pkgs }}" diff --git a/tasks/pkgs/tldr.yml b/tasks/pkgs/tldr.yml index 8fbaeb9..9eafc22 100644 --- a/tasks/pkgs/tldr.yml +++ b/tasks/pkgs/tldr.yml @@ -1,19 +1,13 @@ # vim: set filetype=yaml.ansible : --- -- name: append to syspkgs - ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'tlrc' ] }}" +- name: Append to pkg_sys when: - ansible_os_family == 'Darwin' + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + ['tlrc'] }}" -- name: linux specific install - block: - - ansible.builtin.include_tasks: - file: "pkgs/rust.yml" - when: pkgconfig_rust is undefined - - - name: add to cargopkgs - ansible.builtin.set_fact: - cargopkgs: "{{ cargopkgs + [ 'tlrc' ] }}" +- name: Add to pkg_cargo when: - - ansible_os_family != 'Darwin' + - ansible_system == 'Linux' + ansible.builtin.set_fact: + pkg_cargo: "{{ pkg_cargo + ['tlrc'] }}" diff --git a/tasks/pkgs/tmux.yml b/tasks/pkgs/tmux.yml index 98d489c..663e09d 100644 --- a/tasks/pkgs/tmux.yml +++ b/tasks/pkgs/tmux.yml @@ -1,7 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkgs ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'tmux' ] }}" - tags: - - packages + pkg_sys: "{{ pkg_sys + ['tmux'] }}" diff --git a/tasks/pkgs/vault.yml b/tasks/pkgs/vault.yml index 9c139bf..82c63dd 100644 --- a/tasks/pkgs/vault.yml +++ b/tasks/pkgs/vault.yml @@ -1,10 +1,21 @@ # vim: set filetype=yaml.ansible : --- -- name: ensure hashicorp repo is active - ansible.builtin.include_tasks: - file: "pkgs/hashicorp_repo.yml" - when: hashicorp is undefined +- name: Append to pkgs + block: + - name: MacOS specific + when: + - ansible_system == 'Darwin' + notify: + - Depend hashicorp repo + changed_when: true + ansible.builtin.set_fact: + pkg_tap: "{{ pkg_tap + vault.pkgs }}" -- name: append to pkgs - ansible.builtin.set_fact: - tappkgs: "{{ tappkgs + [ pkgconfig.vault[ansible_system] ] }}" + - name: Linux specific + when: + - ansible_system == 'Linux' + notify: + - Depend hashicorp repo + changed_when: true + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + vault.pkgs }}" diff --git a/tasks/pkgs/xh.yml b/tasks/pkgs/xh.yml index b8afd36..8a51d68 100644 --- a/tasks/pkgs/xh.yml +++ b/tasks/pkgs/xh.yml @@ -1,19 +1,13 @@ # vim: set filetype=yaml.ansible : --- -- name: append to syspkgs - ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'xh' ] }}" +- name: Append to pkg_sys when: - ansible_os_family == 'Darwin' + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + ['xh'] }}" -- name: linux specific install - block: - - ansible.builtin.include_tasks: - file: "pkgs/rust.yml" - when: pkgconfig_rust is undefined - - - name: add to cargopkgs - ansible.builtin.set_fact: - cargopkgs: "{{ cargopkgs + [ 'xh' ] }}" +- name: Add to cargopkgs when: - - ansible_os_family != 'Darwin' + - ansible_system == 'Linux' + ansible.builtin.set_fact: + pkg_cargo: "{{ pkg_cargo + [xh] }}" diff --git a/tasks/pkgs/yamlls.yml b/tasks/pkgs/yamlls.yml index f23448d..a27b45f 100644 --- a/tasks/pkgs/yamlls.yml +++ b/tasks/pkgs/yamlls.yml @@ -1,9 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_tasks: - file: pkgs/nodejs.yml - when: nodejs is undefined - -- name: add to npmpkgs +- name: Add to pkg_npm + notify: + - Depend node + changed_when: true ansible.builtin.set_fact: - npmpkgs: "{{ npmpkgs + ['yaml-language-server'] }}" + pkg_npm: "{{ pkg_npm + ['yaml-language-server'] }}" diff --git a/tasks/pkgs/zfs.yml b/tasks/pkgs/zfs.yml index 83cd170..ad78de3 100644 --- a/tasks/pkgs/zfs.yml +++ b/tasks/pkgs/zfs.yml @@ -1,68 +1,58 @@ # vim: set filetype=yaml.ansible : --- - name: Linux based installation + when: + - ansible_system == 'Linux' block: - name: RedHat based configuration + when: + - ansible_os_family == 'RedHat' block: - - ansible.builtin.set_fact: - rhname: "{%if ansible_distribution == 'Fedora' %}fedora{% else %}epel{% endif %}" - - ansible.builtin.command: - cmd: rpm --eval "%{dist}" - register: rpm_dist - - - name: add openzfs gpg_key + - name: Add openzfs gpg_key + become: "{{ sys_pkg_become }}" ansible.builtin.rpm_key: - key: "{{ pkgconfig.zfs.gpg_key }}" - fingerprint: "{{ pkgconfig.zfs.gpg_key_fingerprint }}" + key: "{{ zfs.gpg_key }}" + fingerprint: "{{ zfs.gpg_fp }}" state: present - become: true - - name: enable openzfs repository + - name: Enable openzfs repository + become: "{{ sys_pkg_become }}" ansible.builtin.dnf: - name: "{{ pkgconfig.zfs.repo_base }}{{ rhname }}/zfs-release-{{ pkgconfig.zfs[rhname].release }}{{ rpm_dist.stdout }}.noarch.rpm" - state: "{{ install_state }}" - become: true - - - name: install zfs deps - ansible.builtin.set_fact: - syspkgs: "{{ pkgconfig.zfs.deps[ansible_os_family] }}" - when: ansible_os_family == 'RedHat' + name: "{{ zfs.repo_pkg }}" + disable_gpg_check: "{{ zfs.skip_gpg_check }}" + state: present - name: Debian configuration - when: ansible_os_family == 'Debian' + when: + - ansible_os_family == 'Debian' block: - - name: enable openzfs repository + - name: Enable openzfs repository + become: "{{ sys_pkg_become }}" ansible.builtin.apt_repository: repo: | - deb http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main contrib - deb-src http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main contrib - filename: "{{ ansible_distribution_release }}-backports" + deb http://deb.debian.org/debian {{ zfs.release }}-backports main contrib + deb-src http://deb.debian.org/debian {{ zfs.release }}-backports main contrib + filename: "{{ zfs.release }}-backports" state: present update_cache: false - become: true - - name: pin zfs package to backports + - name: Pin zfs package to backports + become: "{{ sys_pkg_become }}" ansible.builtin.file: + dest: /etc/apt/preferences.d/90_zfs + state: file + mode: '0644' content: | Package: src:zfs-linux - Pin: release n={{ ansible_distribution_release }}-backports + Pin: release n={{ zfs.release }}-backports Pin-Priority: 990 - dest: /etc/apt/preferences.d/90_zfs - state: present - become: true - - name: install zfs deps - ansible.builtin.set_fact: - syspkgs: "{{ pkgconfig.zfs.deps[ansible_os_family] }}" - become: true - - - name: append to pkgs + - name: Append to pkgs ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig.zfs.pkgs[ansible_os_family] }}" - become: true - when: ansible_os_family != 'Darwin' + pkg_sys: "{{ pkg_sys + zfs.deps + zfs.pkgs }}" -- name: append to caskpkgs +- name: Append to caskpkgs + when: + - ansible_os_family == 'Darwin' ansible.builtin.set_fact: - caskpkgs: "{{ caskpkgs + [ 'openzfs' ] }}" - when: ansible_os_family == 'Darwin' + pkg_cask: "{{ pkg_cask + ['openzfs'] }}" diff --git a/tasks/pkgs/zig.yml b/tasks/pkgs/zig.yml index a36c852..4804ef5 100644 --- a/tasks/pkgs/zig.yml +++ b/tasks/pkgs/zig.yml @@ -1,11 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_vars: - file: zig.yml - name: _zig -- ansible.builtin.set_fact: - pkgconfig_zig: "{{ _zig | ansible.builtin.combine(pkgconfig.zig) }}" - -- name: append to pkgs +- name: Append to pkgs ansible.builtin.set_fact: - srcpkgs: "{{ srcpkgs + [ 'zig' ] }}" + pkg_archive: "{{ pkg_archive + ['zig'] }}" diff --git a/tasks/pkgs/zls.yml b/tasks/pkgs/zls.yml index d61d26f..e259621 100644 --- a/tasks/pkgs/zls.yml +++ b/tasks/pkgs/zls.yml @@ -1,11 +1,8 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_vars: - file: zls.yml - name: _zls -- ansible.builtin.set_fact: - pkgconfig_zls: "{{ _zls | ansible.builtin.combine(pkgconfig.zls) }}" - -- name: append to pkgs +- name: Append to pkgs + notify: + - Depend zig + changed_when: true ansible.builtin.set_fact: - srcpkgs: "{{ srcpkgs + [ 'zls' ] }}" + pkg_archive: "{{ pkg_archive + ['zls'] }}" diff --git a/tasks/pkgs/zoxide.yml b/tasks/pkgs/zoxide.yml index 5e9f779..abfa6fc 100644 --- a/tasks/pkgs/zoxide.yml +++ b/tasks/pkgs/zoxide.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkgs ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'zoxide' ] }}" + pkg_sys: "{{ pkg_sys + ['zoxide'] }}" diff --git a/tasks/pkgs/zsh.yml b/tasks/pkgs/zsh.yml index 7e9ff21..ca93dcd 100644 --- a/tasks/pkgs/zsh.yml +++ b/tasks/pkgs/zsh.yml @@ -1,10 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: append to pkgs +- name: Append to pkgs ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ 'zsh' ] }}" - when: ansible_os_family != 'Darwin' - -- debug: - msg: "macOS already has zsh, skipping" - when: ansible_os_family == 'Darwin' + pkg_sys: "{{ pkg_sys + ['zsh'] }}" diff --git a/tasks/repos/hashicorp.yml b/tasks/repos/hashicorp.yml new file mode 100644 index 0000000..9962b96 --- /dev/null +++ b/tasks/repos/hashicorp.yml @@ -0,0 +1,49 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Load hashicorp repo config + ansible.builtin.include_tasks: + file: config/hashicorp.yml + +- name: RedHat repository + when: + - ansible_os_family == 'RedHat' + block: + - name: Enable hashicorp repo + become: true + ansible.builtin.get_url: + url: "{{ hashicorp.repo }}" + dest: /etc/yum.repos.d/hashicorp.repo + mode: '0644' + +- name: Debian based repository + when: + - ansible_os_family == 'Debian' + block: + - name: Get hashicorp archive gpg key + ansible.builtin.get_url: + dest: "{{ d_tempdir.path }}/hashicorp_gpg" + url: https://apt.releases.hashicorp.com/gpg + mode: '0644' + + - name: Install hashicorp archive gpg key + become: true + ansible.builtin.command: + creates: /usr/share/keyrings/hashicorp-archive-keyring.gpg + cmd: + - gpg + - --dearmor + - -o + - /usr/share/keyrings/hashicorp-archive-keyring.gpg + - "{{ d_tempdir.path }}/hashicorp_gpg" + + - name: Enable hasicorp repo for debian + ansible.builtin.apt_repository: + repo: "{{ pkgconfig.hashicorp.Linux.Debian.repo }}" + state: present + update_cache: false + +- name: MacOS specific configuration + when: + - ansible_distribution == 'MacOSX' + ansible.builtin.set_fact: + brewtap: "{{ brewtap + ['hashicorp/tap'] }}" diff --git a/tasks/pkgs/terra_repo.yml b/tasks/repos/terra.yml similarity index 68% rename from tasks/pkgs/terra_repo.yml rename to tasks/repos/terra.yml index 676c560..cc36c3e 100644 --- a/tasks/pkgs/terra_repo.yml +++ b/tasks/repos/terra.yml @@ -1,22 +1,25 @@ # vim: set filetype=yaml.ansible : --- -- name: enable terra repo for fedora - when: ansible_distribution == 'Fedora' +- name: Enable terra repo for fedora + when: + - ansible_distribution == 'Fedora' block: - - name: enable terra repo for fedora >=41 + - name: Enable terra repo for fedora >=41 become: true when: ansible_distribution_major_version|int >= 41 ansible.builtin.command: creates: /etc/yum.repos.d/terra.repo cmd: "dnf config-manager addrepo --from-repofile={{ pkgconfig.terrarepo.repo }}" - - name: enable terra repo for fedora < 41 + - name: Enable terra repo for fedora < 41 become: true when: ansible_distribution_major_version|int < 41 ansible.builtin.command: creates: /etc/yum.repos.d/terra.repo cmd: "dnf config-manager --add-repo {{ pkgconfig.terrarepo.repo }}" - - ansible.builtin.dnf: + - name: Install terra release package + become: true + ansible.builtin.dnf: name: terra-release state: present diff --git a/tasks/src/ghostty.yml b/tasks/src/ghostty.yml new file mode 100644 index 0000000..b6c4210 --- /dev/null +++ b/tasks/src/ghostty.yml @@ -0,0 +1,17 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Build ghostty from source + block: + - name: Clone ghostty git repository + ansible.builtin.git: + depth: 1 + dest: "{{ d_tempdir.path }}/ghostty" + repo: "{{ ghostty.repo }}" + version: "{{ ghostty.vers }}" + + - name: Build ghostty + become: "{{ ext_become }}" + register: c_ghostty_build + ansible.builtin.command: + chdir: "{{ d_tempdir.path }}/ghostty" + cmd: "zig build -p {{ path.prefix }} -D{{ pkgconfig_ghostty.optimize }}" diff --git a/tasks/build/neovide.yml b/tasks/src/neovide.yml similarity index 100% rename from tasks/build/neovide.yml rename to tasks/src/neovide.yml diff --git a/tasks/src/neovim.yml b/tasks/src/neovim.yml new file mode 100644 index 0000000..20ac6cc --- /dev/null +++ b/tasks/src/neovim.yml @@ -0,0 +1,23 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Create temp path + ansible.builtin.tempfile: + state: directory + prefix: nvim. + register: d_nvim_tmp + +- name: Clone neovim git repository + ansible.builtin.git: + depth: 1 + dest: "{{ d_nvim_tmp.path }}/neovim" + repo: "{{ pkgconfig_neovim.git_repo }}" + version: "{{ pkgconfig_neovim.version }}" + +- name: Build and install neovim + become: "{{ ext_become }}" + ansible.builtin.make: + chdir: "{{ d_tempdir.path }}/neovim" + params: + CMAKE_BUILD_TYPE: "{{ neovim.build_type }}" + CMAKE_INSTALL_PREFIX: "{{ path.prefix }}" + target: install diff --git a/tests/Containerfile.debian b/tests/Containerfile.debian new file mode 100644 index 0000000..67ca74f --- /dev/null +++ b/tests/Containerfile.debian @@ -0,0 +1,18 @@ +FROM debian:bookworm +LABEL PROJECT "ansible_role_package" +LABEL MAINTAINER "Matthew Stobbs " + +RUN useradd -d /home/ansible -m -G wheel ansible +RUN apt update && \ + apt install -y openssh-server python3-paramiko gnupg2 +EXPOSE 22 + +USER ansible +WORKDIR /home/ansible +RUN mkdir /home/ansible/.ssh +COPY ./pubkey /home/ansible/.ssh/authorized_keys + +USER root +RUN echo "ansible ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/sudoers +RUN ssh-keygen -A +ENTRYPOINT /usr/sbin/sshd -D diff --git a/tests/Containerfile.el9 b/tests/Containerfile.el9 new file mode 100644 index 0000000..15f4d96 --- /dev/null +++ b/tests/Containerfile.el9 @@ -0,0 +1,17 @@ +FROM almalinux:9 +LABEL PROJECT "ansible_role_package" +LABEL MAINTAINER "Matthew Stobbs " + +RUN useradd -d /home/ansible -m -G wheel ansible +RUN dnf install -y openssh-server python3-paramiko python3-libdnf gnupg2 +EXPOSE 22 + +USER ansible +WORKDIR /home/ansible +RUN mkdir /home/ansible/.ssh +COPY ./pubkey /home/ansible/.ssh/authorized_keys + +USER root +RUN echo "ansible ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/sudoers +RUN ssh-keygen -A +ENTRYPOINT /usr/sbin/sshd -D diff --git a/tests/Containerfile.fedora b/tests/Containerfile.fedora new file mode 100644 index 0000000..957c9b1 --- /dev/null +++ b/tests/Containerfile.fedora @@ -0,0 +1,17 @@ +FROM fedora:41 +LABEL PROJECT "ansible_role_package" +LABEL MAINTAINER "Matthew Stobbs " + +RUN useradd -d /home/ansible -m -G wheel ansible +RUN dnf install -y openssh-server python3-paramiko python3-libdnf5 gnupg2 +EXPOSE 22 + +USER ansible +WORKDIR /home/ansible +RUN mkdir /home/ansible/.ssh +COPY ./pubkey /home/ansible/.ssh/authorized_keys + +USER root +RUN echo "ansible ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/sudoers +RUN ssh-keygen -A +ENTRYPOINT /usr/sbin/sshd -D diff --git a/tests/Containerfile.ubuntu b/tests/Containerfile.ubuntu new file mode 100644 index 0000000..334297c --- /dev/null +++ b/tests/Containerfile.ubuntu @@ -0,0 +1,18 @@ +FROM ubuntu:24.04 +LABEL PROJECT "ansible_role_package" +LABEL MAINTAINER "Matthew Stobbs " + +RUN useradd -d /home/ansible -m -G wheel ansible +RUN apt update && \ + apt install -y openssh-server python3-paramiko gnupg2 +EXPOSE 22 + +USER ansible +WORKDIR /home/ansible +RUN mkdir /home/ansible/.ssh +COPY ./pubkey /home/ansible/.ssh/authorized_keys + +USER root +RUN echo "ansible ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/sudoers +RUN ssh-keygen -A +ENTRYPOINT /usr/sbin/sshd -D diff --git a/tests/cleanup.sh b/tests/cleanup.sh new file mode 100755 index 0000000..1669872 --- /dev/null +++ b/tests/cleanup.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env zsh + +IMAGE=packagetest +CONTAINER=packagetest +MACHINENAME=podman-machine-default + +ssh-keygen -R "[127.0.0.1]:2222" +podman stop $CONTAINER +podman rm $IMAGE +podman machine stop $MACHINENAME diff --git a/tests/inventory b/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/tests/inventory.yml b/tests/inventory.yml new file mode 100644 index 0000000..dd14dfb --- /dev/null +++ b/tests/inventory.yml @@ -0,0 +1,7 @@ +test: + hosts: + localhost: + ansible_ssh_host: 127.0.0.1 + ansible_ssh_port: 2222 + ansible_ssh_user: ansible + ansible_ssh_extra_args: "-o StrictHostKeyChecking=no" diff --git a/tests/pubkey b/tests/pubkey new file mode 100644 index 0000000..ea6ad18 --- /dev/null +++ b/tests/pubkey @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAAxfDLK7wu1ITTMV8gIzImO+KkXsjByvN7gYebqb5e+ stobbsm@ed25591 diff --git a/tests/setup.sh b/tests/setup.sh new file mode 100755 index 0000000..c3f330a --- /dev/null +++ b/tests/setup.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env zsh + +IMAGE=packagetest +CONTAINER=packagetest +MACHINENAME=podman-machine-default + +function machine_state { + echo $(podman machine inspect $MACHINENAME | jq -r '.[].State') +} + +echo "Starting $MACHINENAME" +podman machine start -q $MACHINENAME +while [ "$(machine_state)" != "running" ] +do + echo $(machine_state) + echo "Wating for $MACHINENAME to start" + sleep 1 +done + +echo "Machine $MACHINENAME running" + +echo "Building container images" +#podman build --platform linux/amd64 -f Containerfile.el9 -t ${IMAGE}_el9 . +podman build --platform linux/amd64 -f Containerfile.fedora -t ${IMAGE}_fedora . +#podman build --platform linux/amd64 -f Containerfile.debian -t ${IMAGE}_debian . +#podman build --platform linux/amd64 -f Containerfile.ubuntu -t ${IMAGE}_ubuntu . diff --git a/tests/test.sh b/tests/test.sh new file mode 100755 index 0000000..9f8877f --- /dev/null +++ b/tests/test.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env zsh + +podman run --rm -it -d --platform linux/amd64 --name packagetest_fedora -p 2222:22 packagetest +ansible-playbook test_not_local.yml -i inventory.yml +podman stop packagetest +# podman run --rm -it -d --platform linux/amd64 --name packagetest -p 2222:22 packagetest +# ansible-playbook test_not_local.yml -i inventory.yml +# podman stop packagetest +# podman run --rm -it -d --platform linux/amd64 --name packagetest -p 2222:22 packagetest +# ansible-playbook test_not_local.yml -i inventory.yml +# podman stop packagetest +# podman run --rm -it -d --platform linux/amd64 --name packagetest -p 2222:22 packagetest +# ansible-playbook test_not_local.yml -i inventory.yml +# podman stop packagetest diff --git a/tests/test.yml b/tests/test.yml deleted file mode 100644 index 7a3ea63..0000000 --- a/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - ansible_role_package diff --git a/tests/test_not_local.yml b/tests/test_not_local.yml new file mode 100644 index 0000000..d9efe82 --- /dev/null +++ b/tests/test_not_local.yml @@ -0,0 +1,112 @@ +--- +- hosts: localhost + vars: + testpkgs: + - air + - alacritty + - ansible-language-server + - ansible-lint + - ansible + - bashls + - bat + - bitwarden + - blender + - broot + - btop + - buf + - bufls + - carapace + - cheat + - checkmake + - choose + - clangd + - cmake + - cmakelang + - commitlint-cli + - commitlint-config-conventional + - consul + - cssls + - curlie + - dbeaver + - direnv + - dockerls + - dotenv-linter + - duf + - dust + - editorconfig + - eslint + - eza + - fd + - firefox + - flatpak + - fzf + - ghostty + - git + - glow + - go + - godot + - gopls + - gping + - heroic + - htmlls + - htmx-lsp + - httpie + - hugo + - hyperfine + - intelephense + - jinja-lsp + - jq + - jsonls + - kitty + - lazygit + - libreoffice + - lua-language-server + - markdownlint-cli + - mcfly + - neovide + - neovim + - nerdfonts + - nextcloud + - nginxls + - nodejs + - nomad + - packer + - pandoc + - pgadmin + - pipx + - podman + - pyright + - python3 + - quobix-vacuum + - revive + - ripgrep + - rust + - sd + - sqlfluff + - sqlls + - starship + - stow + - tailscale + - tailwindcss-languageserver + - templ + - terraform + - terraformls + - thunderbird + - tidy + - tldr + - tmux + - vault + - xh + - yamlls + - zfs + - zig + - zls + - zoxide + - zsh + tasks: + - name: Test all packages with use_local=false + ansible.builtin.include_role: + name: ansible_role_package + vars: + use_local: false + packages: "{{ testpkgs }}" diff --git a/vars/alacritty.yml b/vars/alacritty.yml deleted file mode 100644 index 2bb30a8..0000000 --- a/vars/alacritty.yml +++ /dev/null @@ -1,4 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -version: 0.15.0 -install_prefix: "{{ default_config.install_prefix }}" diff --git a/vars/bitwarden.yml b/vars/bitwarden.yml deleted file mode 100644 index a2263fe..0000000 --- a/vars/bitwarden.yml +++ /dev/null @@ -1,9 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -install_prefix: "{{ default_config.install_prefix }}" -install_dir: /opt/bitwarden -use_flatpak: true -use_appimage: false -dobecome: true -owner: root -group: root diff --git a/vars/carapace.yml b/vars/carapace.yml deleted file mode 100644 index 431be9c..0000000 --- a/vars/carapace.yml +++ /dev/null @@ -1,3 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -version: 1.1.1 diff --git a/vars/ghostty.yml b/vars/ghostty.yml deleted file mode 100644 index 7e30ecb..0000000 --- a/vars/ghostty.yml +++ /dev/null @@ -1,8 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -version: v1.0.1 -optimize: ReleaseFast -build: false -dobecome: true -owner: root -group: root diff --git a/vars/go.yml b/vars/go.yml deleted file mode 100644 index eed4e44..0000000 --- a/vars/go.yml +++ /dev/null @@ -1,4 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -version: 1.23.6 -install_path: "{{ default_config.install_prefix }}" diff --git a/vars/libreoffice.yml b/vars/libreoffice.yml deleted file mode 100644 index be06690..0000000 --- a/vars/libreoffice.yml +++ /dev/null @@ -1,3 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -use_flatpak: false diff --git a/vars/lua-language-server.yml b/vars/lua-language-server.yml deleted file mode 100644 index cddd43e..0000000 --- a/vars/lua-language-server.yml +++ /dev/null @@ -1,5 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -version: 3.13.5 -install_prefix: "{{ default_config.install_prefix }}" -install_path: /opt/lua-language-server diff --git a/vars/main.yml b/vars/main.yml index aee1363..a05766d 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,465 +1,26 @@ # vim: set filetype=yaml.ansible : # variables used in ansible_role_package --- -assume_missing_is_syspkg: true -full_upgrade: false -install_state: present -default_config: - install_prefix: /usr/local - become: true - owner: root - group: root +use_local: true +prefer_method: system +packages: [] # list of packages to install -# install lists -brewtaps: [] -cargopkgs: [] -cargoversioned: [] -caskpkgs: [] -flatpkgs: [] -flatpkg_repo: - - name: flathub - url: https://dl.flathub.org/repo/flathub.flatpakrepo -gopkgs: [] -npmpkgs: [] -packages: [] -pipxpkgs: [] -srcpkgs: [] -syspkgs: [] -tappkgs: [] +defaults: + path: + prefix: "/usr/local" + suffix: + appimage: "/appimage" # keep appimages here + archive: "/archive" # extract archives here + bin: "/bin" # installation prefix. Binaries are placed in `{{ install }}/bin` + cargo: "/cargo" # cargo install location + go: "/go" # GOROOT + pipx: "/pipx" # where pipx environments are installed (venvs). They are symlinked to `bin` -# pkgconfig, loaded from .yml files in vars -# and combined. Configuration can be changed -# when running the role by specifying -# pkgconfig. as a dict -pkgconfig: - alacritty: - deps: - RedHat: - - cmake - - freetype-devel - - fontconfig-devel - - libxcb-devel - - libxkbcommon-devel - - g++ - Debian: - - cmake - - pkg-config - - libfreetype6-dev - - libfontconfig1-dev - - libxcb-xfixes0-dev - - libxkbcommon-dev - - python3 - git_repo: https://github.com/alacritty/alacritty.git - - bitwarden: {} - broot: - deps: - Debian: - - build-essential - - libxcb1-dev - - libxcb-render0-dev - - libxcb-shape0-dev - - libxcb-xfixes0-dev - RedHat: - - libxcb - carapace: - pkgs: - Linux: - - carapace-bin - Darwin: - - carapace - clangd: - pkgs: - RedHat: - - clang-devel - Debian: - - clangd-12 - Darwin: - - llvm - consul: - Linux: consul - Darwin: hashicorp/tap/consul - fd: - pkg: - Darwin: - - fd - RedHat: - - fd-find - Debian: - - fd-find - flatpak: {} - ghostty: - deps: - Debian: - - libgtk-4-dev - - libadwaita-1-dev - RedHat: - - gtk4-devel - - libadwaita-devel - git_repo: https://github.com/ghostty-org/ghostty - git: - pkgs: - Darwin: - - git - - git-delta - - git-extras - - git-lfs - Linux: - - git - - git-delta - - git-email - - git-lfs - go: - archmap: - arm64: arm64 - aarch64: arm64 - x86_64: amd64 - extmap: - Darwin: pkg - Linux: tar.gz - sums: - 1.23.6: - Darwin: - amd64: sha256:7fa387c228b4dd69b518a5d9425638fa5c0d86ec8943de373e3802aff2e5b12a - arm64: sha256:a167758a44e08af6eddf844ed86a6acdbff1d3957248913bbca7ee4ef6ff07d0 - Linux: - amd64: sha256:9379441ea310de000f33a4dc767bd966e72ab2826270e038e78b2c53c2e7802d - arm64: sha256:561c780e8f4a8955d32bf72e46af0b5ee5e0debe1e4633df9a03781878219202 - 1.23.5: - Darwin: - amd64: sha256:d2b06bf0b8299e0187dfe2d8ad39bd3dd96a6d93fe4d1cfd42c7872452f4a0a2 - arm64: sha256:f819ed94939e08a5016b9a607ec84ebbde6cb3fe59750c59d97aa300c3fd02df - Linux: - amd64: sha256:cbcad4a6482107c7c7926df1608106c189417163428200ce357695cc7e01d091 - arm64: sha256:47c84d332123883653b70da2db7dd57d2a865921ba4724efcdf56b5da7021db0 - hashicorp: - Linux: - RedHat: - repo: https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo - Fedora: - repo: https://rpm.releases.hashicorp.com/fedora/hashicorp.repo - Debian: - repo: "deb [arch={{ ansible_architecture }} signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com {{ ansible_distribution_release }} main" - jellyfin: {} - kitty: - pkgs: - Darwin: - - kitty - Linux: - - kitty - - kitty-shell-integration - libreoffice: - flatpak: - - org.libreoffice.LibreOffice - Debian: - - libreoffice - RedHat: - - libreoffice - luals: - base_url: https://github.com/LuaLS/lua-language-server/releases/download - sysmap: - Darwin: darwin - Linux: linux - archmap: - aarch64: arm64 - arm64: arm64 - x86_64: x64 - neovide: - git_repo: https://github.com/neovide/neovide.git - deps: - RedHat: - - fontconfig-devel - - freetype-devel - - libX11-xcb - - libX11-devel - - libstdc++-static - - libstdc++-devel - - "@Development Tools" - - "@Development Libraries" - Debian: - - fontconfig-devel - - freetype-devel - - libX11-xcb - - libX11-devel - - libstdc++-static - - libstdc++-devel - - "@Development Tools" - - "@Development Libraries" - neovim: - git_repo: https://github.com/neovim/neovim - appimage_url_pfx: https://github.com/neovim/neovim/releases/download - nerdfonts: - fonts: - 0xProto: - brew: font-0xproto-nerd-font - "3270": - brew: font-3270-nerd-font - Agave: - brew: font-agave-nerd-font - AnonymousPro: - brew: font-anonymice-nerd-font - Arimo: - brew: font-arimo-nerd-font - AurulentSansMono: - brew: font-aurulent-sans-mono-nerd-font - BigBlueTerminal: - brew: font-bigblue-terminal-nerd-font - BitstreamVeraSansMono: - brew: font-bitstream-vera-sans-mono-nerd-font - IBMPlexMono: - brew: font-blex-mono-nerd-font - CascadiaCode: - brew: font-caskaydia-cove-nerd-font - CascadiaMono: - brew: font-caskaydia-mono-nerd-font - CodeNewRoman: - brew: font-code-new-roman-nerd-font - ComicShannsMono: - brew: font-comic-shanns-mono-nerd-font - CommitMono: - brew: font-commit-mono-nerd-font - Cousine: - brew: font-cousine-nerd-font - D2Coding: - brew: font-d2coding-nerd-font - DaddyTimeMono: - brew: font-daddy-time-mono-nerd-font - DejaVuSansMono: - brew: font-dejavu-sans-mono-nerd-font - DepartureMono: - brew: font-departure-mono-nerd-font - DroidSansMono: - brew: font-droid-sans-mono-nerd-font - EnvyCodeR: - brew: font-envy-code-r-nerd-font - FantasqueSansMono: - brew: font-fantasque-sans-mono-nerd-font - FiraCode: - brew: font-fira-code-nerd-font - FiraMono: - brew: font-fira-mono-nerd-font - GeistMono: - brew: font-geist-mono-nerd-font - Go-Mono: - brew: font-go-mono-nerd-font - Gohu: - brew: font-gohufont-nerd-font - Hack: - brew: font-hack-nerd-font - Hasklig: - brew: font-hasklug-nerd-font - HeavyData: - brew: font-heavy-data-nerd-font - Hermit: - brew: font-hurmit-nerd-font - IA-Writer: - brew: font-im-writing-nerd-font - InconsolataGo: - brew: font-inconsolata-go-nerd-font - InconsolataLGC: - brew: font-inconsolata-lgc-nerd-font - Inconsolata: - brew: font-inconsolata-nerd-font - IntelOneMono: - brew: font-intone-mono-nerd-font - Iosevka: - brew: font-iosevka-nerd-font - IosevkaTerm: - brew: font-iosevka-term-nerd-font - IosevkaTermSlab: - brew: font-iosevka-term-slab-nerd-font - JetBrainsMono: - brew: font-jetbrains-mono-nerd-font - Lekton: - brew: font-lekton-nerd-font - LiberationMono: - brew: font-liberation-nerd-font - Lilex: - brew: font-lilex-nerd-font - MPlus: - brew: font-m+-nerd-font - MartianMono: - brew: font-martian-mono-nerd-font - Meslo: - brew: font-meslo-lg-nerd-font - Monaspace: - brew: font-monaspace-nerd-font - Monofur: - brew: font-monofur-nerd-font - Mononoki: - brew: font-mononoki-nerd-font - Monoid: - brew: font-monoid-nerd-font - NerdFontsSymbolsOnly: - brew: font-symbols-only-nerd-font - Noto: - brew: font-noto-nerd-font - OpenDyslexic: - brew: font-open-dyslexic-nerd-font - Overpass: - brew: font-overpass-nerd-font - ProFont: - brew: font-profont-nerd-font - ProggyClean: - brew: font-proggy-clean-tt-nerd-font - Recursive: - brew: font-recursive-mono-nerd-font - RobotoMono: - brew: font-roboto-mono-nerd-font - SourceCodePro: - brew: font-sauce-code-pro-nerd-font - ShareTechMono: - brew: font-shure-tech-mono-nerd-font - SpaceMono: - brew: font-space-mono-nerd-font - Terminus: - brew: font-terminess-ttf-nerd-font - Tinos: - brew: font-tinos-nerd-font - UbuntuMono: - brew: font-ubuntu-mono-nerd-font - Ubuntu: - brew: font-ubuntu-nerd-font - UbuntuSans: - brew: font-ubuntu-sans-nerd-font - VictorMono: - brew: font-victor-mono-nerd-font - ZedMono: - brew: font-zed-mono-nerd-font - base_url: https://github.com/ryanoasis/nerd-fonts/releases/latest/download - nodejs: - pkgs: - Darwin: - - node - Linux: - - nodejs - - npm - nomad: - Linux: nomad - Darwin: hashicorp/tap/nomad - nushell: - deps: - Darwin: - - openssl - - cmake - Debian: - - pkg-config - - libssl-dev - - build-essential - RedHat: - - libxcb - - openssl-devel - - libX11-devel - nupkgs_extra: [] - nupkgs_common: - - nu - - nu_plugin_compress - - nu_plugin_desktop_notifications - - nu_plugin_dns - - nu_plugin_file_dialog - - nu_plugin_formats - - nu_plugin_gstat - - nu_plugin_hashes - - nu_plugin_hcl - - nu_plugin_highlight - - nu_plugin_inc - - nu_plugin_json_path - - nu_plugin_net - - nu_plugin_polars - - nu_plugin_query - - nu_plugin_selector - pkgs: - Darwin: - - nu_plugin_plist - Debian: [] - RedHat: - - nu_plugin_rpm - packer: - Linux: packer - Darwin: packer - python3: - pkgs: - Darwin: - - python3 - Linux: - - python3 - - python3-pip - rust: - pkgs: - Darwin: - - rust - Linux: - - rustc - - cargo - tailscale: - url_base: https://pkgs.tailscale.com/stable - release: - bookworm: - gpg: bookworm.noarmor.gpg - list: bookworm.tailscale-keyring.list - bullseye: - gpg: bullseye.noarmor.gpg - list: bullseye.tailscale-keyring.list - buster: - gpg: buster.gpg - list: buster.list - stretch: - gpg: stretch.gpg - list: stretch.list - terraform: - Linux: terraform - Darwin: hashicorp/tap/terraform - terraformls: - Linux: terraform-ls - Darwin: hashicorp/tap/terraform-ls - terrarepo: - repo: https://terra.fyralabs.com/terra.repo - tidy: - pkgs: - Darwin: - - tidy-html5 - Linux: - - tidy - vault: - Linux: vault - Darwin: hashicorp/tap/vault - zfs: - repo_base: https://zfsonlinux.org - gpg_key: https://raw.githubusercontent.com/zfsonlinux/zfsonlinux.github.com/master/zfs-release/RPM-GPG-KEY-openzfs-key2 - gpg_key_fingerprint: 7DC7 299D CF7C 7FD9 CD87 701B A599 FD5E 9DB8 4141 - fedora: - release: 2-6 - epel: - release: 2-3 - pkgs: - RedHat: - - zfs - Debian: - - zfs-dkms - - zfsutils-linux - deps: - RedHat: - - kernel-devel - - epel-release - Debian: - - dpkg-dev - - linux-headers-generic - - linux-image-generic - zig: - base_url: https://ziglang.org/download - sysmap: - Darwin: macos - Linux: linux - archmap: - aarch64: aarch64 - arm64: aarch64 - x86_64: x86_64 - zls: - base_url: https://builds.zigtools.org - sysmap: - Darwin: macos - Linux: linux - archmap: - aarch64: aarch64 - arm64: aarch64 - x86_64: x86_64 +# paths resolve to either $HOME/.local as the prefix, or /usr/local +# all created paths are named: +# - paths.appimage: $PREFIX/appimage +# - paths.archive: $PREFIX/archive +# - paths.bin: $PREFIX/bin +# - paths.cargo: $PREFIX/cargo +# - paths.go: $PREFIX/go +# - paths.pipx: $PREFIX/pipx diff --git a/vars/neovide.yml b/vars/neovide.yml deleted file mode 100644 index 5f1472c..0000000 --- a/vars/neovide.yml +++ /dev/null @@ -1,4 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -version: 0.14.0 -install_prefix: "{{ default_config.install_prefix }}" diff --git a/vars/neovim.yml b/vars/neovim.yml deleted file mode 100644 index 485ba88..0000000 --- a/vars/neovim.yml +++ /dev/null @@ -1,11 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -version: v0.10.3 -install_prefix: "{{ default_config.install_prefix }}" -install_dir: /opt/nvim -use_appimage: true -use_syspkg: true -build_type: Release -dobecome: true -owner: root -group: root diff --git a/vars/nerdfonts.yml b/vars/nerdfonts.yml deleted file mode 100644 index 44c44fe..0000000 --- a/vars/nerdfonts.yml +++ /dev/null @@ -1,10 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -install: - - CascadiaCode - - FiraCode - - Hasklig - - Lilex - - Monoid - - NerdFontsSymbolsOnly -system_install: false diff --git a/vars/nushell.yml b/vars/nushell.yml deleted file mode 100644 index 4bedf01..0000000 --- a/vars/nushell.yml +++ /dev/null @@ -1,3 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -install_extra: true diff --git a/vars/pkgs/alacritty.yml b/vars/pkgs/alacritty.yml new file mode 100644 index 0000000..61866bd --- /dev/null +++ b/vars/pkgs/alacritty.yml @@ -0,0 +1,21 @@ +alacritty: + version: 0.15.1 + RedHat: + build_deps: + - cmake + - freetype-devel + - fontconfig-devel + - libxcb-devel + - libxkbcommon-devel + - g++ + Debian: + build_deps: + - cmake + - pkg-config + - libfreetype6-dev + - libfontconfig1-dev + - libxcb-xfixes0-dev + - libxkbcommon-dev + - python3 + cask: + - alacritty diff --git a/vars/pkgs/bitwarden.yml b/vars/pkgs/bitwarden.yml new file mode 100644 index 0000000..3b7ff4b --- /dev/null +++ b/vars/pkgs/bitwarden.yml @@ -0,0 +1,14 @@ +bitwarden: + flatpak: + name: com.bitwarden.desktop + remote: flathub + appimage: + link_name: bitwarden + name: bitwarden.appimage + url: https://vault.bitwarden.com/download/?app=desktop&platform=linux&variant=appimage + snap: bitwarden + brew: bitwarden + method: + Fedora: flatpak + Ubuntu: snap + MacOSX: brew diff --git a/vars/pkgs/broot.yml b/vars/pkgs/broot.yml new file mode 100644 index 0000000..b196d23 --- /dev/null +++ b/vars/pkgs/broot.yml @@ -0,0 +1,12 @@ +broot: + version: 1.44.7 + build_deps: + Debian: + - build-essential + - libxcb1-dev + - libxcb-render0-dev + - libxcb-shape0-dev + - libxcb-xfixes0-dev + RedHat: + - libxcb + Darwin: [] diff --git a/vars/pkgs/carapace.yml b/vars/pkgs/carapace.yml new file mode 100644 index 0000000..b9a604f --- /dev/null +++ b/vars/pkgs/carapace.yml @@ -0,0 +1,16 @@ +carapace: + version: 0.2.0 + pkgs: + Linux: + - carapace-bin + Darwin: + - carapace + repo: + RedHat: + name: carapace-yum + description: carapace-yum + baseurl: https://yum.fury.io/rsteube/ + Debian: + repo: "deb [trusted=yes] https://apt.fury.io/rsteube/ /" + name: carapace + Darwin: {} diff --git a/vars/pkgs/choose.yml b/vars/pkgs/choose.yml new file mode 100644 index 0000000..b07ea00 --- /dev/null +++ b/vars/pkgs/choose.yml @@ -0,0 +1,2 @@ +choose: + version: 1.3.6 diff --git a/vars/pkgs/clangd.yml b/vars/pkgs/clangd.yml new file mode 100644 index 0000000..3bf41c5 --- /dev/null +++ b/vars/pkgs/clangd.yml @@ -0,0 +1,8 @@ +clangd: + pkgs: + RedHat: + - clang-devel + Debian: + - clangd-12 + Darwin: + - llvm diff --git a/vars/pkgs/consul.yml b/vars/pkgs/consul.yml new file mode 100644 index 0000000..e912d6b --- /dev/null +++ b/vars/pkgs/consul.yml @@ -0,0 +1,6 @@ +consul: + pkgs: + Linux: + - consul + Darwin: + - hashicorp/tap/consul diff --git a/vars/pkgs/fd.yml b/vars/pkgs/fd.yml new file mode 100644 index 0000000..a2a2380 --- /dev/null +++ b/vars/pkgs/fd.yml @@ -0,0 +1,6 @@ +fd: + pkgs: + Darwin: + - fd + Linux: + - fd-find diff --git a/vars/pkgs/ghostty.yml b/vars/pkgs/ghostty.yml new file mode 100644 index 0000000..682691c --- /dev/null +++ b/vars/pkgs/ghostty.yml @@ -0,0 +1,25 @@ +ghostty: + version: 1.1.2+1 + optimize: ReleaseFast + build_deps: + Debian: + - libgtk-4-dev + - libadwaita-1-dev + RedHat: + - gtk4-devel + - libadwaita-devel + Darwin: [] + archmap: + arm64: aarch64 + x86_64: x86_64 + appimage: + base_url: https://github.com/psadi/ghostty-appimage/releases/download/ + link_name: ghostty + cask: + - ghostty + sys: + - ghostty + methods: + default: appimage + Fedora: sys + MacOSX: cask diff --git a/vars/pkgs/git.yml b/vars/pkgs/git.yml new file mode 100644 index 0000000..8f4cce8 --- /dev/null +++ b/vars/pkgs/git.yml @@ -0,0 +1,12 @@ +git: + pkgs: + Darwin: + - git + - git-delta + - git-extras + - git-lfs + Linux: + - git + - git-delta + - git-email + - git-lfs diff --git a/vars/pkgs/go.yml b/vars/pkgs/go.yml new file mode 100644 index 0000000..f3d10fe --- /dev/null +++ b/vars/pkgs/go.yml @@ -0,0 +1,32 @@ +go: + base_url: https://go.dev/dl + version: 1.24.0 + archmap: + arm64: arm64 + aarch64: arm64 + x86_64: amd64 + extmap: + Darwin: pkg + Linux: tar.gz + sums: + 1.24.0: + Darwin: + amd64: sha256:dee0ea64411a00b47ded586d5a8e30cfe3acf51564aa1bb24e039a6dca807a29 + arm64: sha256:b19eb6b7ae87f8371c3e7a84d129db67779a2883d2fffa6bb90412b0167df133 + Linux: + amd64: sha256:dea9ca38a0b852a74e81c26134671af7c0fbe65d81b0dc1c5bfe22cf7d4c8858 + arm64: sha256:c3fa6d16ffa261091a5617145553c71d21435ce547e44cc6dfb7470865527cc7 + 1.23.6: + Darwin: + amd64: sha256:7fa387c228b4dd69b518a5d9425638fa5c0d86ec8943de373e3802aff2e5b12a + arm64: sha256:a167758a44e08af6eddf844ed86a6acdbff1d3957248913bbca7ee4ef6ff07d0 + Linux: + amd64: sha256:9379441ea310de000f33a4dc767bd966e72ab2826270e038e78b2c53c2e7802d + arm64: sha256:561c780e8f4a8955d32bf72e46af0b5ee5e0debe1e4633df9a03781878219202 + 1.23.5: + Darwin: + amd64: sha256:d2b06bf0b8299e0187dfe2d8ad39bd3dd96a6d93fe4d1cfd42c7872452f4a0a2 + arm64: sha256:f819ed94939e08a5016b9a607ec84ebbde6cb3fe59750c59d97aa300c3fd02df + Linux: + amd64: sha256:cbcad4a6482107c7c7926df1608106c189417163428200ce357695cc7e01d091 + arm64: sha256:47c84d332123883653b70da2db7dd57d2a865921ba4724efcdf56b5da7021db0 diff --git a/vars/pkgs/hashicorp.yml b/vars/pkgs/hashicorp.yml new file mode 100644 index 0000000..8b7b8e4 --- /dev/null +++ b/vars/pkgs/hashicorp.yml @@ -0,0 +1,10 @@ +hashicorp: + Linux: + ".el9": + repo: https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo + ".fc40": + repo: https://rpm.releases.hashicorp.com/fedora/hashicorp.repo + ".fc41": + repo: https://rpm.releases.hashicorp.com/fedora/hashicorp.repo + debian: + repo: "deb [arch={{ ansible_architecture }} signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com {{ ansible_distribution_release }} main" diff --git a/vars/pkgs/httpie.yml b/vars/pkgs/httpie.yml new file mode 100644 index 0000000..5478f96 --- /dev/null +++ b/vars/pkgs/httpie.yml @@ -0,0 +1,8 @@ +httpie: + flatpak: + name: io.httpie.Httpie + remote: flathub + brew: httpie + method: + default: flatpak + MacOSX: brew diff --git a/vars/pkgs/kitty.yml b/vars/pkgs/kitty.yml new file mode 100644 index 0000000..4b4bcf7 --- /dev/null +++ b/vars/pkgs/kitty.yml @@ -0,0 +1,7 @@ +kitty: + pkgs: + Darwin: + - kitty + Linux: + - kitty + - kitty-shell-integration diff --git a/vars/pkgs/libreoffice.yml b/vars/pkgs/libreoffice.yml new file mode 100644 index 0000000..4f21fb5 --- /dev/null +++ b/vars/pkgs/libreoffice.yml @@ -0,0 +1,16 @@ +libreoffice: + methods: + default: sys + Ubuntu: flatpak + Fedora: flatpak + MacOSX: cask + flatpak: + name: org.libreoffice.LibreOffice + remote: flathub + pkgs: + Debian: + - libreoffice + RedHat: + - libreoffice + Darwin: + - libreoffice diff --git a/vars/pkgs/luals.yml b/vars/pkgs/luals.yml new file mode 100644 index 0000000..1571760 --- /dev/null +++ b/vars/pkgs/luals.yml @@ -0,0 +1,10 @@ +luals: + version: 3.13.5 + base_url: https://github.com/LuaLS/lua-language-server/releases/download + sysmap: + Darwin: darwin + Linux: linux + archmap: + aarch64: arm64 + arm64: arm64 + x86_64: x64 diff --git a/vars/pkgs/neovide.yml b/vars/pkgs/neovide.yml new file mode 100644 index 0000000..b26ee0c --- /dev/null +++ b/vars/pkgs/neovide.yml @@ -0,0 +1,22 @@ +neovide: + version: 0.14.0 + git_repo: https://github.com/neovide/neovide.git + build_deps: + RedHat: + - fontconfig-devel + - freetype-devel + - libX11-xcb + - libX11-devel + - libstdc++-static + - libstdc++-devel + - "@Development Tools" + - "@Development Libraries" + Debian: + - fontconfig-devel + - freetype-devel + - libX11-xcb + - libX11-devel + - libstdc++-static + - libstdc++-devel + - "@Development Tools" + - "@Development Libraries" diff --git a/vars/pkgs/neovim.yml b/vars/pkgs/neovim.yml new file mode 100644 index 0000000..a20e4ec --- /dev/null +++ b/vars/pkgs/neovim.yml @@ -0,0 +1,14 @@ +neovim: + version: 0.10.4 + git_repo: https://github.com/neovim/neovim + appimage: + base_url: https://github.com/neovim/neovim/releases/download + link_name: nvim + methods: + default: src + Fedora: sys + Ubuntu: sys + MacOSX: sys + pkgs: + default: + - neovim diff --git a/vars/pkgs/nerdfonts.yml b/vars/pkgs/nerdfonts.yml new file mode 100644 index 0000000..abcb1a1 --- /dev/null +++ b/vars/pkgs/nerdfonts.yml @@ -0,0 +1,140 @@ +nerdfonts: + fonts: + 0xProto: + brew: font-0xproto-nerd-font + "3270": + brew: font-3270-nerd-font + Agave: + brew: font-agave-nerd-font + AnonymousPro: + brew: font-anonymice-nerd-font + Arimo: + brew: font-arimo-nerd-font + AurulentSansMono: + brew: font-aurulent-sans-mono-nerd-font + BigBlueTerminal: + brew: font-bigblue-terminal-nerd-font + BitstreamVeraSansMono: + brew: font-bitstream-vera-sans-mono-nerd-font + IBMPlexMono: + brew: font-blex-mono-nerd-font + CascadiaCode: + brew: font-caskaydia-cove-nerd-font + CascadiaMono: + brew: font-caskaydia-mono-nerd-font + CodeNewRoman: + brew: font-code-new-roman-nerd-font + ComicShannsMono: + brew: font-comic-shanns-mono-nerd-font + CommitMono: + brew: font-commit-mono-nerd-font + Cousine: + brew: font-cousine-nerd-font + D2Coding: + brew: font-d2coding-nerd-font + DaddyTimeMono: + brew: font-daddy-time-mono-nerd-font + DejaVuSansMono: + brew: font-dejavu-sans-mono-nerd-font + DepartureMono: + brew: font-departure-mono-nerd-font + DroidSansMono: + brew: font-droid-sans-mono-nerd-font + EnvyCodeR: + brew: font-envy-code-r-nerd-font + FantasqueSansMono: + brew: font-fantasque-sans-mono-nerd-font + FiraCode: + brew: font-fira-code-nerd-font + FiraMono: + brew: font-fira-mono-nerd-font + GeistMono: + brew: font-geist-mono-nerd-font + Go-Mono: + brew: font-go-mono-nerd-font + Gohu: + brew: font-gohufont-nerd-font + Hack: + brew: font-hack-nerd-font + Hasklig: + brew: font-hasklug-nerd-font + HeavyData: + brew: font-heavy-data-nerd-font + Hermit: + brew: font-hurmit-nerd-font + IA-Writer: + brew: font-im-writing-nerd-font + InconsolataGo: + brew: font-inconsolata-go-nerd-font + InconsolataLGC: + brew: font-inconsolata-lgc-nerd-font + Inconsolata: + brew: font-inconsolata-nerd-font + IntelOneMono: + brew: font-intone-mono-nerd-font + Iosevka: + brew: font-iosevka-nerd-font + IosevkaTerm: + brew: font-iosevka-term-nerd-font + IosevkaTermSlab: + brew: font-iosevka-term-slab-nerd-font + JetBrainsMono: + brew: font-jetbrains-mono-nerd-font + Lekton: + brew: font-lekton-nerd-font + LiberationMono: + brew: font-liberation-nerd-font + Lilex: + brew: font-lilex-nerd-font + MPlus: + brew: font-m+-nerd-font + MartianMono: + brew: font-martian-mono-nerd-font + Meslo: + brew: font-meslo-lg-nerd-font + Monaspace: + brew: font-monaspace-nerd-font + Monofur: + brew: font-monofur-nerd-font + Mononoki: + brew: font-mononoki-nerd-font + Monoid: + brew: font-monoid-nerd-font + NerdFontsSymbolsOnly: + brew: font-symbols-only-nerd-font + Noto: + brew: font-noto-nerd-font + OpenDyslexic: + brew: font-open-dyslexic-nerd-font + Overpass: + brew: font-overpass-nerd-font + ProFont: + brew: font-profont-nerd-font + ProggyClean: + brew: font-proggy-clean-tt-nerd-font + Recursive: + brew: font-recursive-mono-nerd-font + RobotoMono: + brew: font-roboto-mono-nerd-font + SourceCodePro: + brew: font-sauce-code-pro-nerd-font + ShareTechMono: + brew: font-shure-tech-mono-nerd-font + SpaceMono: + brew: font-space-mono-nerd-font + Terminus: + brew: font-terminess-ttf-nerd-font + Tinos: + brew: font-tinos-nerd-font + UbuntuMono: + brew: font-ubuntu-mono-nerd-font + Ubuntu: + brew: font-ubuntu-nerd-font + UbuntuSans: + brew: font-ubuntu-sans-nerd-font + VictorMono: + brew: font-victor-mono-nerd-font + ZedMono: + brew: font-zed-mono-nerd-font + base_url: https://github.com/ryanoasis/nerd-fonts/releases/latest/download + path: share/fonts diff --git a/vars/pkgs/nextcloud.yml b/vars/pkgs/nextcloud.yml new file mode 100644 index 0000000..8d6934d --- /dev/null +++ b/vars/pkgs/nextcloud.yml @@ -0,0 +1,4 @@ +nextcloud: + flatpak: + name: com.nextcloud.desktopclient.nextcloud + remote: flathub diff --git a/vars/pkgs/nodejs.yml b/vars/pkgs/nodejs.yml new file mode 100644 index 0000000..41d34dd --- /dev/null +++ b/vars/pkgs/nodejs.yml @@ -0,0 +1,7 @@ +nodejs: + pkgs: + Darwin: + - node + Linux: + - nodejs + - npm diff --git a/vars/pkgs/nomad.yml b/vars/pkgs/nomad.yml new file mode 100644 index 0000000..42a38c3 --- /dev/null +++ b/vars/pkgs/nomad.yml @@ -0,0 +1,6 @@ +nomad: + pkgs: + Linux: + - nomad + Darwin: + - hashicorp/tap/nomad diff --git a/vars/pkgs/packer.yml b/vars/pkgs/packer.yml new file mode 100644 index 0000000..49a6196 --- /dev/null +++ b/vars/pkgs/packer.yml @@ -0,0 +1,6 @@ +packer: + pkgs: + Linux: + - packer + Darwin: + - packer diff --git a/vars/pkgs/pgadmin.yml b/vars/pkgs/pgadmin.yml new file mode 100644 index 0000000..5e3afe0 --- /dev/null +++ b/vars/pkgs/pgadmin.yml @@ -0,0 +1,13 @@ +pgadmin: + flatpak: + name: org.pgadmin.pgadmin4 + remote: flathub + methods: + default: flatpak + MacOSX: cask + Fedora: flatpak + Ubuntu: flatpak + pkgs: + Darwin: + - pgadmin4 + Linux: [] diff --git a/vars/pkgs/python3.yml b/vars/pkgs/python3.yml new file mode 100644 index 0000000..897216e --- /dev/null +++ b/vars/pkgs/python3.yml @@ -0,0 +1,7 @@ +python3: + pkgs: + Darwin: + - python3 + Linux: + - python3 + - python3-pip diff --git a/vars/pkgs/rust.yml b/vars/pkgs/rust.yml new file mode 100644 index 0000000..f7fbc28 --- /dev/null +++ b/vars/pkgs/rust.yml @@ -0,0 +1,7 @@ +rust: + pkgs: + Darwin: + - rust + Linux: + - rustc + - cargo diff --git a/vars/pkgs/tailscale.yml b/vars/pkgs/tailscale.yml new file mode 100644 index 0000000..dc6bd46 --- /dev/null +++ b/vars/pkgs/tailscale.yml @@ -0,0 +1,15 @@ +tailscale: + url_base: https://pkgs.tailscale.com/stable + release: + bookworm: + gpg: bookworm.noarmor.gpg + list: bookworm.tailscale-keyring.list + bullseye: + gpg: bullseye.noarmor.gpg + list: bullseye.tailscale-keyring.list + buster: + gpg: buster.gpg + list: buster.list + stretch: + gpg: stretch.gpg + list: stretch.list diff --git a/vars/pkgs/terraform.yml b/vars/pkgs/terraform.yml new file mode 100644 index 0000000..409abf8 --- /dev/null +++ b/vars/pkgs/terraform.yml @@ -0,0 +1,6 @@ +terraform: + pkgs: + Linux: + - terraform + Darwin: + - hashicorp/tap/terraform diff --git a/vars/pkgs/terraformls.yml b/vars/pkgs/terraformls.yml new file mode 100644 index 0000000..57999c4 --- /dev/null +++ b/vars/pkgs/terraformls.yml @@ -0,0 +1,6 @@ +terraformls: + pkgs: + Linux: + - terraform-ls + Darwin: + - hashicorp/tap/terraform-ls diff --git a/vars/pkgs/terrarepo.yml b/vars/pkgs/terrarepo.yml new file mode 100644 index 0000000..af94a1a --- /dev/null +++ b/vars/pkgs/terrarepo.yml @@ -0,0 +1,2 @@ +terrarepo: + repo: https://terra.fyralabs.com/terra.repo diff --git a/vars/pkgs/tidy.yml b/vars/pkgs/tidy.yml new file mode 100644 index 0000000..be2c764 --- /dev/null +++ b/vars/pkgs/tidy.yml @@ -0,0 +1,6 @@ +tidy: + pkgs: + Darwin: + - tidy-html5 + Linux: + - tidy diff --git a/vars/pkgs/vault.yml b/vars/pkgs/vault.yml new file mode 100644 index 0000000..017a153 --- /dev/null +++ b/vars/pkgs/vault.yml @@ -0,0 +1,6 @@ +vault: + pkgs: + Linux: + - vault + Darwin: + - hashicorp/tap/vault diff --git a/vars/pkgs/xh.yml b/vars/pkgs/xh.yml new file mode 100644 index 0000000..c0c70ac --- /dev/null +++ b/vars/pkgs/xh.yml @@ -0,0 +1,2 @@ +xh: + version: 0.24.0 diff --git a/vars/pkgs/zfs.yml b/vars/pkgs/zfs.yml new file mode 100644 index 0000000..d350fe5 --- /dev/null +++ b/vars/pkgs/zfs.yml @@ -0,0 +1,24 @@ +zfs: + repo_base: https://zfsonlinux.org + gpg_key: https://raw.githubusercontent.com/zfsonlinux/zfsonlinux.github.com/master/zfs-release/RPM-GPG-KEY-openzfs-key2 + gpg_key_fingerprint: 7DC7 299D CF7C 7FD9 CD87 701B A599 FD5E 9DB8 4141 + fedora: + release: 2-6 + epel: + release: 2-3 + pkgs: + RedHat: + - zfs + Debian: + - zfs-dkms + - zfsutils-linux + build_deps: + Fedora: + - kernel-devel + RedHat: + - kernel-devel + - epel-release + Debian: + - dpkg-dev + - linux-headers-generic + - linux-image-generic diff --git a/vars/pkgs/zig.yml b/vars/pkgs/zig.yml new file mode 100644 index 0000000..26b27e1 --- /dev/null +++ b/vars/pkgs/zig.yml @@ -0,0 +1,10 @@ +zig: + version: 0.13.0 + base_url: https://ziglang.org/download + sysmap: + Darwin: macos + Linux: linux + archmap: + aarch64: aarch64 + arm64: aarch64 + x86_64: x86_64 diff --git a/vars/pkgs/zls.yml b/vars/pkgs/zls.yml new file mode 100644 index 0000000..7fe592e --- /dev/null +++ b/vars/pkgs/zls.yml @@ -0,0 +1,10 @@ +zls: + version: 0.13.0 + base_url: https://builds.zigtools.org + sysmap: + Darwin: macos + Linux: linux + archmap: + aarch64: aarch64 + arm64: aarch64 + x86_64: x86_64 diff --git a/vars/rust.yml b/vars/rust.yml deleted file mode 100644 index 1f1ac2d..0000000 --- a/vars/rust.yml +++ /dev/null @@ -1,3 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -rustup_managed: false diff --git a/vars/zig.yml b/vars/zig.yml deleted file mode 100644 index 7eef36e..0000000 --- a/vars/zig.yml +++ /dev/null @@ -1,5 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -version: 0.13.0 -install_prefix: "{{ default_config.install_prefix }}" -install_path: /opt/zig diff --git a/vars/zls.yml b/vars/zls.yml deleted file mode 100644 index 5b0372d..0000000 --- a/vars/zls.yml +++ /dev/null @@ -1,5 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -version: 0.13.0 -install_prefix: "{{ default_config.install_prefix }}" -install_path: /opt/zls