make the packages role more generic

This commit is contained in:
Matthew Stobbs
2025-01-18 09:24:11 -07:00
parent 3d466e64c7
commit 333ee4c3f5
112 changed files with 1610 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
---
- name: append alacritty to caskpkgs
set_fact:
caskpkgs: "{{ (caskpkgs | default([])) + [ 'alacritty' ] }}"
tags:
- MacOS
- brew
- package

8
tasks/Darwin/ansible.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append ansible to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'ansible' ]}}"
tags:
- MacOS
- homebrew
- package

8
tasks/Darwin/btop.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append btop to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'btop' ]}}"
tags:
- MacOS
- brew
- package

View File

@@ -0,0 +1,9 @@
---
- name: append carapace to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'carapace' ] }}"
tags:
- MacOS
- homebrew
- package
- nushell

8
tasks/Darwin/cmake.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append cmake to caskpkgs
set_fact:
caskpkgs: "{{ (caskpkgs | default([])) + [ 'homebrew/cask/cmake' ] }}"
tags:
- MacOS
- homebrew
- package

View File

@@ -0,0 +1,8 @@
---
- name: append editorconfig to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'editorconfig' ]}}"
tags:
- MacOS
- homebrew
- package

9
tasks/Darwin/firefox.yml Normal file
View File

@@ -0,0 +1,9 @@
---
- name: append firefox to caskpkgs
set_fact:
caskpkgs: "{{ (caskpkgs | default([])) + [ 'firefox' ] }}"
tags:
- packages
- MacOS
- homebrew
- web

8
tasks/Darwin/fzf.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append fzf to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'fzf' ]}}"
tags:
- MacOS
- homebrew
- package

9
tasks/Darwin/ghostty.yml Normal file
View File

@@ -0,0 +1,9 @@
---
- name: append ghostty to caskpkgs
set_fact:
caskpkgs: "{{ (caskpkgs | default([])) + [ 'ghostty' ] }}"
tags:
- MacOS
- brew
- package
- terminal

20
tasks/Darwin/git.yml Normal file
View File

@@ -0,0 +1,20 @@
---
- name: set git_pkgs
set_fact:
git_pkgs:
- git
- git-delta
- git-extras
- git-lfs
tags:
- MacOS
- homebrew
- package
- name: append git to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + git_pkgs }}"
tags:
- MacOS
- homebrew
- package

35
tasks/Darwin/go.yml Normal file
View File

@@ -0,0 +1,35 @@
---
- name: Set go Filename
ansible.builtin.set_fact:
goFilename: "go{{ go.version }}.darwin-{{ arch[ansible_architecture] }}.{{ go.darwin.extension }}"
tags:
- dev
- go
- name: Download latest go package for MacOS
become: true
ansible.builtin.get_url:
dest: "/tmp/{{ goFilename }}"
url: "https://go.dev/dl/{{ goFilename }}"
checksum: "sha256:{{ go.darwin.sum[ansible_architecture] }}"
decompress: false
tags:
- dev
- go
- name: Install go MacOS use pkg file
become: true
ansible.builtin.command:
cmd: "installer -pkg /tmp/{{ goFilename }} -target /"
tags:
- dev
- go
- name: Cleanup go package download
become: true
ansible.builtin.file:
path: "/tmp/{{ goFilename }}"
state: absent
tags:
- dev
- go

8
tasks/Darwin/hugo.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append hugo to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'hugo' ]}}"
tags:
- MacOS
- homebrew
- package

4
tasks/Darwin/iterm2.yml Normal file
View File

@@ -0,0 +1,4 @@
---
- name: append iterm2 to caskpkgs
set_fact:
caskpkgs: "{{ (caskpkgs | default([])) + [ 'iterm2' ] }}"

8
tasks/Darwin/jq.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append jq to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'jq' ]}}"
tags:
- MacOS
- homebrew
- package

4
tasks/Darwin/neovide.yml Normal file
View File

@@ -0,0 +1,4 @@
---
- name: append neovide to caskpkgs
set_fact:
caskpkgs: "{{ (caskpkgs | default([])) + [ 'neovide' ] }}"

8
tasks/Darwin/neovim.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append neovim to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'neovim' ]}}"
tags:
- MacOS
- homebrew
- package

View File

@@ -0,0 +1,16 @@
---
- name: MacOS Tap homebrew fonts
community.general.homebrew_tap:
name: homebrew/cask-fonts
state: present
- name: generate nerdfont cask names
loop: "{{ nerdfonts }}"
loop_control:
loop_var: font
set_fact:
nerdfont_casks: "{{ (nerdfont_casks | default([])) + [ 'homebrew/cask/font-' + font.brew + '-nerd-font' ] }}"
- name: append nerdfonts to caskpkgs
set_fact:
caskpkgs: "{{ (caskpkgs | default([])) + nerdfont_casks }}"

8
tasks/Darwin/nodejs.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append node to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'node' ]}}"
tags:
- MacOS
- homebrew
- package

9
tasks/Darwin/nushell.yml Normal file
View File

@@ -0,0 +1,9 @@
---
- name: append nushell to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'nushell' ]}}"
tags:
- MacOS
- homebrew
- package
- shell

8
tasks/Darwin/pandoc.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append pandoc to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'pandoc' ]}}"
tags:
- MacOS
- homebrew
- package

8
tasks/Darwin/pipx.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append pipx to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'pipx' ]}}"
tags:
- MacOS
- homebrew
- package

View File

@@ -0,0 +1,8 @@
---
- name: append python3 to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'python3' ]}}"
tags:
- MacOS
- homebrew
- package

8
tasks/Darwin/ripgrep.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append ripgrep to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'ripgrep' ]}}"
tags:
- MacOS
- homebrew
- package

8
tasks/Darwin/rust.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append rust to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'rust' ]}}"
tags:
- MacOS
- homebrew
- package

8
tasks/Darwin/stow.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append stow to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'stow' ]}}"
tags:
- MacOS
- homebrew
- package

11
tasks/Darwin/terminal.yml Normal file
View File

@@ -0,0 +1,11 @@
---
# default on Linux is alacritty
# edit config/users.yml:users:<user item>:terminal:os_name:package name
# ie: config/users.yml:users:[name: stobbsm]:terminal:Fedora:konsole
- name: install and configure system terminal emulator
loop: "{{ users }}"
ansible.builtin.include_tasks:
file: "packages/{{ ansible_os_family }}/{{ item.terminal[ansible_distribution] | default('alacritty') }}.yml"
tags:
- package
- Darwin

View File

@@ -0,0 +1,4 @@
---
- name: append terraform to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'terraform' ]}}"

8
tasks/Darwin/tidy.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append tidy-html5 to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'tidy-html5' ]}}"
tags:
- MacOS
- homebrew
- package

8
tasks/Darwin/tmux.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append tmux to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'tmux' ]}}"
tags:
- MacOS
- homebrew
- package

4
tasks/Darwin/vivaldi.yml Normal file
View File

@@ -0,0 +1,4 @@
---
- name: append vivaldi to caskpkgs
set_fact:
caskpkgs: "{{ (caskpkgs | default([])) + [ 'vivaldi' ] }}"

8
tasks/Darwin/zoxide.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append zoxide to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'zoxide' ]}}"
tags:
- MacOS
- homebrew
- package

8
tasks/Darwin/zsh.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: append zsh to brewpkgs
set_fact:
brewpkgs: "{{ (brewpkgs | default([])) + [ 'zsh' ]}}"
tags:
- MacOS
- homebrew
- package

View File

@@ -0,0 +1,45 @@
---
- name: full homebrew upgrade if enabled
community.general.homebrew:
update_homebrew: true
upgrade_all: true
when: full_upgrade
tags:
- upgrade
- packages
- Darwin
- macOS
- homebrew
- name: full cask upgrade if enabled
community.general.homebrew_cask:
upgrade_all: true
when: full_upgrade
tags:
- upgrade
- packages
- Darwin
- macOS
- homebrew
- homebrew_cask
- name: install homebrew pkgs
community.general.homebrew:
name: "{{ syspkgs | unique }}"
state: "{{ install_state }}"
tags:
- packages
- Darwin
- macOS
- homebrew
- name: install homebrew casks
community.general.homebrew_cask:
name: "{{ (caskpkgs | default([])) | unique }}"
state: "{{ install_state }}"
tags:
- packages
- Darwin
- macOS
- homebrew
- homebrew_cask

View File

@@ -0,0 +1,26 @@
---
- name: install rust and cargo
ansible.builtin.include_tasks:
file: "packages/{{ ansible_os_family }}/rust.yml"
tags:
- rust
- dependency
- name: install alacritty dependencies for Debian based distributions
become: true
ansible.builtin.apt:
name:
- cmake
- pkg-config
- libfreetype6-dev
- libfontconfig1-dev
- libxcb-xfixes0-dev
- libxkbcommon-dev
- python3
state: present
tags:
- dependency
- Debian
- include_tasks:
file: packages/Linux/alacritty.yml

14
tasks/Debian/ansible.yml Normal file
View File

@@ -0,0 +1,14 @@
---
- name: install ansible for Debian based distros
become: true
ansible.builtin.apt:
name: ansible
state: latest
register: ansible_changed
tags:
- Debian
- linux
- package
- name: stop playbook if ansible updated
when: ansible_changed.changed
meta: end_play

11
tasks/Debian/btop.yml Normal file
View File

@@ -0,0 +1,11 @@
---
- name: install btop for Debian distros
become: true
when: ansible_os_family == "Debian"
ansible.builtin.apt:
name: btop
state: latest
tags:
- Debian
- linux
- package

10
tasks/Debian/cmake.yml Normal file
View File

@@ -0,0 +1,10 @@
---
- name: Install cmake for Debian based distros
become: true
ansible.builtin.apt:
name: cmake
state: latest
tags:
- Debian
- linux
- package

View File

@@ -0,0 +1,11 @@
---
- name: Install editorconfig Debian based distros
become: true
ansible.builtin.apt:
name: editorconfig
state: latest
tags:
- Debian
- linux
- package

9
tasks/Debian/firefox.yml Normal file
View File

@@ -0,0 +1,9 @@
---
- name: install firefox on Linux distros
ansible.builtin.apt:
name: firefox
state: latest
tags:
- packages
- Debian
- web

10
tasks/Debian/fzf.yml Normal file
View File

@@ -0,0 +1,10 @@
---
- name: Install fzf for Debian based distros
become: true
ansible.builtin.apt:
name: fzf
state: latest
tags:
- Debian
- linux
- package

15
tasks/Debian/git.yml Normal file
View File

@@ -0,0 +1,15 @@
---
- name: Install git and git extras for Debian based distros
become: true
ansible.builtin.apt:
name:
- git
- git-delta
- git-email
- git-lfs
state: latest
tags:
- Debian
- linux
- package

4
tasks/Debian/go.yml Normal file
View File

@@ -0,0 +1,4 @@
---
- name: install go for linux
ansible.builtin.include_tasks:
file: "packages/Linux/go.yml"

11
tasks/Debian/hugo.yml Normal file
View File

@@ -0,0 +1,11 @@
---
- name: Install hugo for Debian based distros
become: true
ansible.builtin.apt:
name: hugo
state: latest
tags:
- Debian
- linux
- package

11
tasks/Debian/jq.yml Normal file
View File

@@ -0,0 +1,11 @@
---
- name: Install jq for Debian based distros
become: true
ansible.builtin.apt:
name: jq
state: latest
tags:
- Debian
- linux
- package

29
tasks/Debian/neovide.yml Normal file
View File

@@ -0,0 +1,29 @@
---
- name: install debian dependencies
when: ansible_architecture != "aarch64"
become: true
ansible.builtin.apt:
name:
- curl
- gnupg
- ca-certificates
- git
- gcc-multilib
- g++-multilib
- cmake
- libssl-dev
- pkg-config
- libfreetyp6-dev
- libasound2-dev
- libexpat1-dev
- libxcb-composite0-dev
- libbz2-dev
- libsndio-dev
- freeglut3-dev
- libxmu-dev
- libxi-dev
- libfontconfig1-dev
- libxcursor-dev
- ansible.builtin.include_tasks:
file: packages/Linux/neovide.yml

12
tasks/Debian/neovim.yml Normal file
View File

@@ -0,0 +1,12 @@
---
- name: Install neovim for Debian based distros
become: true
ansible.builtin.apt:
name:
- neovim
- python3-neovim
state: latest
tags:
- Debian
- linux
- package

View File

@@ -0,0 +1,3 @@
---
- ansible.builtin.include_tasks:
file: packages/Linux/nerdfonts.yml

13
tasks/Debian/nodejs.yml Normal file
View File

@@ -0,0 +1,13 @@
---
- name: Install nodejs and npm for Debian based distros
become: true
ansible.builtin.apt:
name:
- nodejs
- npm
state: latest
tags:
- Debian
- linux
- package

11
tasks/Debian/nushell.yml Normal file
View File

@@ -0,0 +1,11 @@
---
- name: install Debian dependencies
become: true
ansible.builtin.apt:
name:
- pkg-config
- libssl-dev
- build-essential
- ansible.builtin.include_tasks:
file: packages/Linux/nushell.yml

11
tasks/Debian/pandoc.yml Normal file
View File

@@ -0,0 +1,11 @@
---
- name: Install pandoc for Debian based distros
become: true
ansible.builtin.apt:
name: pandoc
state: latest
tags:
- Debian
- linux
- package

11
tasks/Debian/pipx.yml Normal file
View File

@@ -0,0 +1,11 @@
---
- name: Install pipx for Debian based distros
become: true
ansible.builtin.apt:
name: pipx
state: latest
tags:
- Debian
- linux
- package

View File

@@ -0,0 +1,11 @@
---
- name: Install pip for Debian based distros
become: true
ansible.builtin.apt:
name: python3-pip
state: latest
tags:
- Debian
- linux
- package

11
tasks/Debian/ripgrep.yml Normal file
View File

@@ -0,0 +1,11 @@
---
- name: Install ripgrep for Debian based distros
become: true
ansible.builtin.apt:
name: ripgrep
state: latest
tags:
- Debian
- linux
- package

13
tasks/Debian/rust.yml Normal file
View File

@@ -0,0 +1,13 @@
---
- name: Install rust and cargo for Debian based distros
become: true
ansible.builtin.apt:
name:
- rustc
- cargo
state: latest
tags:
- Debian
- linux
- package

11
tasks/Debian/stow.yml Normal file
View File

@@ -0,0 +1,11 @@
---
- name: Install stow for Debian based distros
become: true
ansible.builtin.apt:
name: stow
state: latest
tags:
- Debian
- linux
- package

11
tasks/Debian/terminal.yml Normal file
View File

@@ -0,0 +1,11 @@
---
# default on Linux is alacritty
# edit config/users.yml:users:<user item>:terminal:os_name:package name
# ie: config/users.yml:users:[name: stobbsm]:terminal:Fedora:konsole
- name: install and configure system terminal emulator
loop: "{{ users }}"
ansible.builtin.include_tasks:
file: "packages/{{ ansible_os_family }}/{{ item.terminal[ansible_distribution] | default('alacritty') }}.yml"
tags:
- package
- Debian

11
tasks/Debian/tidy.yml Normal file
View File

@@ -0,0 +1,11 @@
---
- name: Install tidy for Debian based distros
become: true
ansible.builtin.apt:
name: tidy
state: latest
tags:
- Debian
- linux
- package

11
tasks/Debian/tmux.yml Normal file
View File

@@ -0,0 +1,11 @@
---
- name: Install tmux for Debian based distros
become: true
ansible.builtin.apt:
name: tmux
state: latest
tags:
- Debian
- linux
- package

6
tasks/Debian/vivaldi.yml Normal file
View File

@@ -0,0 +1,6 @@
---
- name: install vivaldi debian package
become: true
ansible.builtin.apt:
deb: https://downloads.vivaldi.com/stable/vivaldi-stable_6.7.3329.41-1_amd64.deb
state: present

11
tasks/Debian/zoxide.yml Normal file
View File

@@ -0,0 +1,11 @@
---
- name: Install zoxide for Debian based distros
become: true
ansible.builtin.apt:
name: zoxide
state: latest
tags:
- Debian
- linux
- package

11
tasks/Debian/zsh.yml Normal file
View File

@@ -0,0 +1,11 @@
---
- name: Install zsh for Debian based distros
become: true
ansible.builtin.apt:
name: zsh
state: latest
tags:
- Debian
- linux
- package

13
tasks/Linux/alacritty.yml Normal file
View File

@@ -0,0 +1,13 @@
---
- name: build and install alacritty
become: true
ansible.builtin.command:
cmd:
- cargo
- install
- --root
- /usr/local
- --git
- https://github.com/alacritty/alacritty.git
- --tag
- v0.13.2

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1,8 @@
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=/usr/local/bin/neovide
Name=Neovide
Icon=/usr/share/icons/neovide.png

128
tasks/Linux/gitea.yml Normal file
View File

@@ -0,0 +1,128 @@
---
- name: ensure gitea user exists
become: true
ansible.builtin.user:
comment: gitea user
home: /var/lib/gitea
create_home: false
group: git
name: git
state: present
system: true
- name: install gitea binary
become: true
ansible.builtin.get_url:
backup: true
checksum: "sha256:https://dl.gitea.com/gitea/1.22.2/gitea-1.22.2-linux-amd64.sha256"
decompress: false
dest: /usr/local/bin/gitea
mode: '755'
url: https://dl.gitea.com/gitea/1.22.2/gitea-1.22.2-linux-amd64
state: present
- name: ensure gitea paths exist
become: true
ansible.builtin.file:
group: git
owner: git
mode: '750'
path: '{{ item }}'
state: directory
loop:
- /var/lib/gitea
- /var/lib/gitea/custom
- /var/lib/gitea/data
- /var/lib/gitea/log
- name: ensure gitea configuration directory exists
become: true
ansible.builtin.file:
group: git
owner: root
mode: '750'
path: /etc/gitea
state: directory
- name: install gitea configuration
become: true
ansible.builtin.template:
backup: true
group: git
owner: root
mode: '640'
dest: /etc/gitea/app.ini
src: gitea/app.ini.j2
vars:
# global settings
app_name: 'Gitea: Git with a cup of tea'
run_mode: prod
workpath: /var/lib/gitea
# repository settings
repository_default_branch: main
repository_disable_http_git: false
repository_enable_push_create_user: true
# server settings
server_allow_graceful_restarts: true
server_app_data_path: ''
server_domain: git.staur.ca
server_enable_gzip: true
server_enable_pprof: false
server_graceful_hammer_time: 1m0s
server_http_addr: 0.0.0.0
server_landing_page: home
server_lfs_jwt_secret: dvyUMJ81VjfO_PuHJt_4W-b6S58-yU2oMfF0N8KqzNg
server_lfs_start_server: true
server_local_use_proxy: false
server_minimum_key_size_check: true
server_offline_mode: false
server_per_write_kb_timeout: 10s
server_per_write_timeout: 30s
server_port: 3000
server_protocol: http
server_proxy_protocol_accept_unknown: false
server_proxy_protocol_tls_bridging: false
server_redirector_use_proxy_protocol: false
server_ssh_domain: gitea.applications.staur.ca
server_ssh_listen_port: 22
server_ssh_port: 22
server_startup_timeout: 0s
server_static_cache_time: 1h0m0s
server_static_root_path: /data
server_use_proxy_protocol: false
sever_proxy_protocol_header_timeout: 5s
# database settings
database_host: postgres01.applications.staur.ca
database_log_sql: false
database_name: gitea
database_passwd: gitea
database_ssl_mode: disable
database_type: postgres
database_user: gitea
# session settings
session_cookie_name: gitea_session
session_cookie_secure: true
session_provider: db
session_provider_config: /sessions
# security settings
security_secret_key: L2tOg455yeumJDDUEdw1ma69ckdoKP1UMgVZ9bXJZkCKkhCjfQmngYXDllUzdTKG
security_internal_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE2OTM2MjA3NDh9.NCqR3b7ZHTwTcGky9FtSEii4ams2rG3Y06Iqvorc65Y
# service settings
service_disable_registration: true
service_require_signin_view: false
service_enable_captcha: false
service_register_email_confirm: true
service_no_reply_address: noreply+git@stobbs.ca
service_default_keep_email_private: true
service_default_enable_timetracking: true
service_allow_only_external_registration: false
service_allow_enable_notify_mail: false
service_default_allow_create_oranization: true
# lfs minio settings
lfs_minio_access_key_id: jvafijdsllesb5cuoj2s7eqe7zpq
lfs_minio_bucket: git-lfs-stobbs-ca
lfs_minio_endpoint: gateway.storjshare.io
lfs_minio_location: ca-central-1
lfs_minio_secret_access_key: jzl5ehrxpklz37cdafetar2ihcdldgfadpv5g5udsih7ujf6s2lq6
mailer_passwd:
mailer_protocol:

41
tasks/Linux/go.yml Normal file
View File

@@ -0,0 +1,41 @@
---
- name: Set go Filename
ansible.builtin.set_fact:
goFilename: "go{{ go.version }}.linux-{{ arch[ansible_architecture] }}.{{ go.linux.extension }}"
tags:
- dev
- go
- debug
- name: Download latest go package for linux
become: true
ansible.builtin.get_url:
dest: "/tmp/{{ goFilename }}"
url: "https://go.dev/dl/{{ goFilename }}"
checksum: "sha256:{{ go.linux.sum[ansible_architecture] }}"
decompress: false
tags:
- dev
- go
- name: Ensure go install dir exists
become: true
ansible.builtin.file:
path: /usr/local
state: directory
- name: Extract go package for Linux
become: true
ansible.builtin.unarchive:
dest: /usr/local
src: "/tmp/{{ goFilename }}"
remote_src: true
- name: Cleanup go package download
become: true
ansible.builtin.file:
path: "/tmp/{{ goFilename }}"
state: absent
tags:
- dev
- go

17
tasks/Linux/neovide.yml Normal file
View File

@@ -0,0 +1,17 @@
---
- name: Build and install neovide
become: true
ansible.builtin.command:
cmd: cargo install --root /usr/local --git https://github.com/neovide/neovide
- name: Copy neovide icon
become: true
ansible.builtin.copy:
src: neovide/icon.png
dest: /usr/share/icons/neovide.png
- name: Copy neovide.desktop
become: true
ansible.builtin.copy:
src: neovide/neovide.desktop
dest: /usr/local/share/applications/neovide.desktop

22
tasks/Linux/nerdfonts.yml Normal file
View File

@@ -0,0 +1,22 @@
# Install nerdfonts for each platform
---
- name: Create nerdfonts directories
loop: "{{ nerdfonts }}"
loop_control:
loop_var: font
ansible.builtin.file:
path: "{{ lookup('ansible.builtin.env', 'HOME') }}/.local/share/fonts/{{ font.name }}"
state: directory
register: nerdfont_result
- name: Download and extract nerdfonts
when: nerdfont_result is changed
loop: "{{ nerdfonts }}"
loop_control:
loop_var: font
ansible.builtin.unarchive:
creates: "{{ lookup('ansible.builtin.env', 'HOME') }}/.local/share/fonts/{{ font.name }}/README.md"
src: "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/{{ font.name }}.tar.xz"
dest: "{{ lookup('ansible.builtin.env', 'HOME') }}/.local/share/fonts/{{ font.name }}"
remote_src: true

21
tasks/Linux/nushell.yml Normal file
View File

@@ -0,0 +1,21 @@
---
- name: install nushell via cargo
become: true
ansible.builtin.command:
cmd: "cargo install --root /usr/local {{ nuitem }} --locked"
loop_control:
loop_var: nuitem
loop:
- nu
- nu_plugin_inc
- nu_plugin_polars
- nu_plugin_gstat
- nu_plugin_formats
- nu_plugin_query
- nu_plugin_highlight
- nu_plugin_json_path
- nu_plugin_net
- nu_plugin_prometheus
- nu_plugin_qr_maker
- nu_plugin_rpm
- nu_plugin_semver

View File

@@ -0,0 +1,25 @@
---
- name: install rust and cargo
ansible.builtin.include_tasks:
file: "packages/{{ ansible_os_family }}/rust.yml"
tags:
- rust
- dependency
- name: set alacritty pkg deps
set_fact:
alacritty_deps:
- cmake
- freetype-devel
- fontconfig-devel
- libxcb-devel
- libxkbcommon-devel
- g++
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + alacritty_deps }}"
altpkgs: "{{ (altpkgs | default([])) + [ 'packages/Linux/alacritty.yml' ] }}"
tags:
- syspkgs
- altpkgs

7
tasks/RedHat/ansible.yml Normal file
View File

@@ -0,0 +1,7 @@
# Install ansible for current platform
---
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'ansible' ] }}"

5
tasks/RedHat/btop.yml Normal file
View File

@@ -0,0 +1,5 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'btop' ] }}"

View File

@@ -0,0 +1,7 @@
---
- name: install carapace RPM
become: true
ansible.builtin.dnf:
name: https://github.com/carapace-sh/carapace-bin/releases/download/v1.0.7/carapace-bin_1.0.7_linux_amd64.rpm
state: present
disable_gpg_check: true

9
tasks/RedHat/cmake.yml Normal file
View File

@@ -0,0 +1,9 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'cmake' ] }}"
tags:
- RedHat
- linux
- package

9
tasks/RedHat/consul.yml Normal file
View File

@@ -0,0 +1,9 @@
---
- name: ensure hashicorp repo is active
ansible.builtin.include_tasks:
file: packages/{{ ansible_os_family }}/hashicorp_repo.yml
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'consul' ] }}"

View File

@@ -0,0 +1,8 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'editorconfig' ] }}"
tags:
- RedHat
- linux
- package

9
tasks/RedHat/firefox.yml Normal file
View File

@@ -0,0 +1,9 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'firefox' ] }}"
tags:
- packages
- RedHat
- web

10
tasks/RedHat/fzf.yml Normal file
View File

@@ -0,0 +1,10 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'fzf' ] }}"
tags:
- RedHat
- linux
- package

15
tasks/RedHat/ghostty.yml Normal file
View File

@@ -0,0 +1,15 @@
---
- name: ensure dependencies
ansible.builtin.include_tasks:
file: packages/RedHat/terra_repo.yml
tags:
- dependency
- package
- terra
- syspkgs
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'ghostty' ] }}"
tags:
- syspkgs

10
tasks/RedHat/git.yml Normal file
View File

@@ -0,0 +1,10 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'git', 'git-delta', 'git-email', 'git-lfs' ] }}"
tags:
- RedHat
- linux
- package

5
tasks/RedHat/go.yml Normal file
View File

@@ -0,0 +1,5 @@
---
- name: append to pkgs
set_fact:
altpkgs: "{{ (altpkgs | default([])) + [ 'packages/Linux/go.yml' ] }}"

View File

@@ -0,0 +1,27 @@
# install hashicorp vault for RedHat
---
- 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=https://rpm.releases.hashicorp.com/fedora/hashicorp.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 https://rpm.releases.hashicorp.com/fedora/hashicorp.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 https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo

10
tasks/RedHat/hugo.yml Normal file
View File

@@ -0,0 +1,10 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'hugo' ] }}"
tags:
- RedHat
- linux
- package

10
tasks/RedHat/jq.yml Normal file
View File

@@ -0,0 +1,10 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'jq' ] }}"
tags:
- RedHat
- linux
- package

9
tasks/RedHat/konsole.yml Normal file
View File

@@ -0,0 +1,9 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'konsole' ] }}"
tags:
- RedHat
- linux
- package

19
tasks/RedHat/neovide.yml Normal file
View File

@@ -0,0 +1,19 @@
---
- name: set neovide pkg dependencies
set_fact:
neovide_deps:
- cargo
- fontconfig-devel
- freetype-devel
- libX11-xcb
- libX11-devel
- libstdc++-static
- libstdc++-devel
- "@Development Tools"
- "@Development Libraries"
- name: append to pkgs
when: ansible_architecture != "aarch64"
set_fact:
syspkgs: "{{ (syspkgs | default([])) + neovide_deps }}"
altpkgs: "{{ (altpkgs | default([])) + [ 'packages/Linux/neovide.yml' ] }}"

22
tasks/RedHat/neovim.yml Normal file
View File

@@ -0,0 +1,22 @@
---
- name: append to pkgs
when: ansible_distribution == "Fedora"
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'neovim', 'python3-neovim' ] }}"
tags:
- RedHat
- linux
- package
- name: Install neovim appimage
when: ansible_distribution != "Fedora"
become: true
ansible.builtin.get_url:
url: https://github.com/neovim/neovim/releases/download/v0.10.0/nvim.appimage
dest: /usr/local/bin/nvim
checksum: sha256:6a021e9465fe3d3375e28c3e94c1c2c4f7d1a5a67e4a78cf52d18d77b1471390
tags:
- RedHat
- linux
- package

View File

@@ -0,0 +1,4 @@
---
- name: append to pkgs
set_fact:
altpkgs: "{{ (altpkgs | default([])) + [ 'packages/Linux/nerdfonts.yml' ] }}"

10
tasks/RedHat/nodejs.yml Normal file
View File

@@ -0,0 +1,10 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'nodejs', 'npm' ] }}"
tags:
- RedHat
- linux
- package

9
tasks/RedHat/nomad.yml Normal file
View File

@@ -0,0 +1,9 @@
---
- name: ensure hashicorp repo is active
ansible.builtin.include_tasks:
file: packages/{{ ansible_os_family }}/hashicorp_repo.yml
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'nomad' ] }}"

16
tasks/RedHat/nushell.yml Normal file
View File

@@ -0,0 +1,16 @@
---
- name: install RedHat dependencies
set_fact:
nushell_pkgdeps:
- cargo
- libxcb
- openssl-devel
- libX11-devel
nushell_altdeps:
- packages/Linux/nushell.yml
- packages/{{ ansible_os_family }}/carapace.yml
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + nushell_pkgdeps }}"
altpkgs: "{{ (altpkgs | default([])) + nushell_altdeps }}"

8
tasks/RedHat/packer.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: ensure hashicorp repo is active
ansible.builtin.include_tasks:
file: packages/{{ ansible_os_family }}/hashicorp_repo.yml
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'packer' ] }}"

10
tasks/RedHat/pandoc.yml Normal file
View File

@@ -0,0 +1,10 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'pandoc' ] }}"
tags:
- RedHat
- linux
- package

9
tasks/RedHat/pipx.yml Normal file
View File

@@ -0,0 +1,9 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'pipx' ] }}"
tags:
- RedHat
- linux
- package

View File

@@ -0,0 +1,10 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'python3-pip' ] }}"
tags:
- RedHat
- linux
- package

10
tasks/RedHat/ripgrep.yml Normal file
View File

@@ -0,0 +1,10 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'ripgrep' ] }}"
tags:
- RedHat
- linux
- package

14
tasks/RedHat/rust.yml Normal file
View File

@@ -0,0 +1,14 @@
---
- name: set rust_pkgs
set_fact:
rust_pkgs:
- rustc
- cargo
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + rust_pkgs }}"
tags:
- RedHat
- linux
- package

10
tasks/RedHat/stow.yml Normal file
View File

@@ -0,0 +1,10 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'stow' ] }}"
tags:
- RedHat
- linux
- package

12
tasks/RedHat/terminal.yml Normal file
View File

@@ -0,0 +1,12 @@
---
# default on Linux is alacritty
# edit config/users.yml:users:<user item>:terminal:os_name:package name
# ie: config/users.yml:users:[name: stobbsm]:terminal:Fedora:konsole
- name: install and configure system terminal emulator
loop: "{{ users }}"
ansible.builtin.include_tasks:
file: "packages/{{ ansible_os_family }}/{{ item.terminal[ansible_distribution] | default('alacritty') }}.yml"
tags:
- package
- RedHat

View File

@@ -0,0 +1,22 @@
---
- name: enable terra repo for fedora >=41
become: true
when:
- ansible_distribution == 'Fedora'
- ansible_distribution_major_version|int >= 41
ansible.builtin.command:
creates: /etc/yum.repos.d/terra.repo
cmd: dnf install -y --nogpgcheck --repofrompath 'terra,https://repos.fyralabs.com/terra$releasever' terra-release
- name: enable terra repo for fedora <41
when:
- ansible_distribution == 'Fedora'
- ansible_distribution_major_version|int < 41
block:
- ansible.builtin.command:
creates: /etc/yum.repos.d/terra.repo
cmd: dnf config-manager --add-repo https://terra.fyralabs.com/terra.repo
become: true
- ansible.builtin.dnf:
name: terra-release
state: present

Some files were not shown because too many files have changed in this diff Show More