1
0
Fork 0
dotfiles/packages.yml
2023-08-06 16:36:02 +02:00

100 lines
2.2 KiB
YAML

- name: Install packages
hosts: localhost
gather_facts: true
tasks:
- name: Install system packages
become: yes
ansible.builtin.package:
name:
- git
- tmux
- python3-pip
- fish
- rofi
- rofi-devel
- qalculate
- automake
- libtool
- cheat
state: present
# rust install, shamelessly stolen from https://waylonwalker.com/install-rust/
- name: Check if cargo is installed
shell: ls ~/.cargo
register: cargo_exists
ignore_errors: yes
- name: Download rust installer
when: cargo_exists is failed
get_url:
url: https://sh.rustup.rs
dest: /tmp/sh.rustup.rs
mode: '0755'
force: 'yes'
tags:
- rust
- name: Install rust and cargo
when: cargo_exists is failed
shell: /tmp/sh.rustup.rs -y
tags:
- rust
- name: Install cargo packages
community.general.cargo:
name:
- git-delta
- dotter
- bottom
- git-cliff
- topgrade
- bat
- cargo-update
- cargo-cache
state: latest
- name: Install pipx packages
community.general.pipx:
name: "{{ item }}"
state: latest
loop:
- yt-dlp
- pdm
- poetry
- halig
- pre-commit
- ruff
- thefuck
- name: Download cheatsheets repo
tags:
- cheat
ansible.builtin.git:
repo: https://github.com/cheat/cheatsheets.git
dest: /tmp/cheatsheets
version: master
- name: Create cheat cheatsheets directory
tags:
- cheat
ansible.builtin.file:
path: ~/.config/cheat/cheatsheets/community
state: directory
mode: '0755'
- name: Copy cheatsheets to config
tags:
- cheat
ansible.builtin.copy:
src: /tmp/cheatsheets/
dest: ~/.config/cheat/cheatsheets/community
remote_src: yes
- name: Remove temporary directory
tags:
- cheat
ansible.builtin.file:
path: /tmp/cheatsheets
state: absent