feat(ubuntu): finished up ubuntu desktop setup
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
[local]
|
[local]
|
||||||
test ansible_connection=local
|
test ansible_connection=local ansible_become_pass=vagrant
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
- hosts: local
|
- name: Provision Local Ubuntu Machine
|
||||||
|
hosts: local
|
||||||
|
gather_facts: true
|
||||||
roles:
|
roles:
|
||||||
- setup
|
- setup
|
||||||
|
|||||||
@@ -1,35 +1,15 @@
|
|||||||
---
|
---
|
||||||
- name: Install apt packages
|
- name: Install dependencies
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name:
|
name: "{{ apt_dependencies }}"
|
||||||
- ansible
|
|
||||||
- bat
|
|
||||||
- curl
|
|
||||||
- eza
|
|
||||||
- fd-find
|
|
||||||
- fzf
|
|
||||||
- gcc
|
|
||||||
- keepassxc
|
|
||||||
- libclang-dev
|
|
||||||
- libssl-dev
|
|
||||||
- luarocks
|
|
||||||
- npm
|
|
||||||
- obs-studio
|
|
||||||
- p7zip
|
|
||||||
- pkg-config
|
|
||||||
- python3-pip
|
|
||||||
- python3-venv
|
|
||||||
- ranger
|
|
||||||
- tealdeer
|
|
||||||
- texlive-full
|
|
||||||
- v4l2loopback-dkms
|
|
||||||
- wireguard
|
|
||||||
- wireguard-tools
|
|
||||||
- xsel
|
|
||||||
- zsh
|
|
||||||
state: present
|
state: present
|
||||||
update_cache: true
|
update_cache: true
|
||||||
become: true
|
become: true
|
||||||
|
# - name: Install tools
|
||||||
- name: Update tldr database
|
# ansible.builtin.apt:
|
||||||
ansible.builtin.command: tldr --update
|
# name: "{{ apt_tools }}"
|
||||||
|
# state: present
|
||||||
|
# become: true
|
||||||
|
#
|
||||||
|
# - name: Update tldr database
|
||||||
|
# ansible.builtin.command: tldr --update
|
||||||
|
|||||||
5
roles/setup/tasks/atuin.yml
Normal file
5
roles/setup/tasks/atuin.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- name: Install atuin
|
||||||
|
ansible.builtin.shell: yes | bash -c "curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh"
|
||||||
|
args:
|
||||||
|
creates: "{{ ansible_env.HOME }}/.config/atuin" # Adjust based on atuin installation
|
||||||
@@ -1,47 +1,51 @@
|
|||||||
---
|
---
|
||||||
- name: Install prerequisites for Docker
|
- name: Update cache
|
||||||
|
ansible.builtin.apt:
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Install dependencies for apt to use repositories over HTTPS
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name:
|
name:
|
||||||
- ca-certificates
|
- ca-certificates
|
||||||
- curl
|
- curl
|
||||||
|
- gnupg
|
||||||
|
- lsb-release
|
||||||
state: present
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Add Docker apt key.
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: "{{ docker.url }}/{{ ansible_distribution | lower }}/gpg"
|
||||||
|
dest: /etc/apt/trusted.gpg.d/docker.asc
|
||||||
|
mode: "0664"
|
||||||
|
force: true
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Add Docker repository.
|
||||||
|
ansible.builtin.apt_repository:
|
||||||
|
repo: "deb [arch={{ aarch }}] {{ docker.url }}/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker.apt_release_channel }}"
|
||||||
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Update cache
|
||||||
|
ansible.builtin.apt:
|
||||||
update_cache: true
|
update_cache: true
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Create /etc/apt/keyrings directory
|
- name: Install Docker Engine, containerd, and Docker Compose.
|
||||||
ansible.builtin.file:
|
|
||||||
path: /etc/apt/keyrings
|
|
||||||
state: directory
|
|
||||||
mode: "0755"
|
|
||||||
|
|
||||||
- name: Download Docker GPG key
|
|
||||||
ansible.builtin.get_url:
|
|
||||||
url: https://download.docker.com/linux/ubuntu/gpg
|
|
||||||
dest: /etc/apt/keyrings/docker.asc
|
|
||||||
mode: "0644"
|
|
||||||
|
|
||||||
- name: Add Docker repository
|
|
||||||
ansible.builtin.apt_repository:
|
|
||||||
repo: "deb [arch={{ ansible_architecture }} signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable"
|
|
||||||
filename: docker
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Update apt cache after adding Docker repo
|
|
||||||
ansible.builtin.apt:
|
|
||||||
update_cache: true
|
|
||||||
|
|
||||||
- name: Install Docker packages
|
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name:
|
name:
|
||||||
- docker-ce
|
- docker-ce
|
||||||
- docker-ce-cli
|
- docker-ce-cli
|
||||||
- containerd.io
|
|
||||||
- docker-buildx-plugin
|
|
||||||
- docker-compose-plugin
|
- docker-compose-plugin
|
||||||
|
- containerd.io
|
||||||
state: present
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Add current user to docker group
|
- name: Add current user to docker group
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
name: "{{ ansible_user_id }}"
|
name: "{{ ansible_user_id }}"
|
||||||
groups: docker
|
groups: docker
|
||||||
append: true
|
append: true
|
||||||
|
become: true
|
||||||
|
|||||||
16
roles/setup/tasks/eurkey.yml
Normal file
16
roles/setup/tasks/eurkey.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
- name: Download EurKey deb
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: https://eurkey.steffen.bruentjen.eu/download/debian/eurkey.deb
|
||||||
|
dest: "/tmp/eurkey.deb"
|
||||||
|
|
||||||
|
- name: Install EurKey
|
||||||
|
ansible.builtin.apt:
|
||||||
|
deb: "/tmp/eurkey.deb"
|
||||||
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Remove EurKey deb
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "/tmp/eurkey.deb"
|
||||||
|
state: absent
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
ansible.builtin.unarchive:
|
ansible.builtin.unarchive:
|
||||||
src: "/tmp/FiraMono.zip"
|
src: "/tmp/FiraMono.zip"
|
||||||
dest: "{{ ansible_env.HOME }}/.fonts"
|
dest: "{{ ansible_env.HOME }}/.fonts"
|
||||||
remote_src: yes
|
remote_src: true
|
||||||
|
|
||||||
- name: Remove FiraMono.zip
|
- name: Remove FiraMono.zip
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@@ -23,5 +23,3 @@
|
|||||||
|
|
||||||
- name: Refresh font cache
|
- name: Refresh font cache
|
||||||
ansible.builtin.shell: fc-cache -fv
|
ansible.builtin.shell: fc-cache -fv
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
---
|
---
|
||||||
- name: Get OS release info
|
- name: Get OS release info
|
||||||
ansible.builtin.shell: source /etc/os-release && echo $VERSION_ID
|
ansible.builtin.shell: source /etc/os-release && echo $VERSION_ID
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
register: version_id
|
register: version_id
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Get Ghostty DEB URL
|
- name: Get Ghostty DEB URL
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
curl -s https://api.github.com/repos/mkasberg/ghostty-ubuntu/releases/latest |
|
curl -s https://api.github.com/repos/mkasberg/ghostty-ubuntu/releases/latest |
|
||||||
grep -oP "https://github.com/mkasberg/ghostty-ubuntu/releases/download/[^\s/]+/ghostty_[^\s/_]+_amd64_{{ version_id.stdout }}.deb"
|
grep -oP "https://github.com/mkasberg/ghostty-ubuntu/releases/download/[^\s/]+/ghostty_[^\s/_]+_{{ aarch }}_{{ version_id.stdout }}.deb"
|
||||||
register: ghostty_deb_url
|
register: ghostty_deb_url
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
@@ -21,6 +23,7 @@
|
|||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
deb: "/tmp/{{ ghostty_deb_url.stdout | basename }}"
|
deb: "/tmp/{{ ghostty_deb_url.stdout | basename }}"
|
||||||
state: present
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Remove Ghostty deb file
|
- name: Remove Ghostty deb file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
|||||||
16
roles/setup/tasks/git_delta.yml
Normal file
16
roles/setup/tasks/git_delta.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
- name: Download git-delta deb
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: "https://github.com/dandavison/delta/releases/download/0.18.2/git-delta-musl_0.18.2_{{ aarch }}.deb"
|
||||||
|
dest: "/tmp/git-delta-musl_0.18.2_{{ aarch }}.deb"
|
||||||
|
|
||||||
|
- name: Install git-delta
|
||||||
|
ansible.builtin.apt:
|
||||||
|
deb: "/tmp/git-delta-musl_0.18.2_{{ aarch }}.deb"
|
||||||
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Remove git-delta deb
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "/tmp/git-delta-musl_0.18.2_{{ aarch }}.deb"
|
||||||
|
state: absent
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Download git-delta deb
|
|
||||||
ansible.builtin.get_url:
|
|
||||||
url: https://github.com/dandavison/delta/releases/download/0.18.2/git-delta-musl_0.18.2_amd64.deb
|
|
||||||
dest: "/tmp/git-delta-musl_0.18.2_amd64.deb"
|
|
||||||
|
|
||||||
- name: Install git-delta
|
|
||||||
ansible.builtin.apt:
|
|
||||||
deb: "/tmp/git-delta-musl_0.18.2_amd64.deb"
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Remove git-delta deb
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "/tmp/git-delta-musl_0.18.2_amd64.deb"
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Install atuin
|
|
||||||
become: false
|
|
||||||
ansible.builtin.shell: curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh
|
|
||||||
args:
|
|
||||||
creates: "{{ ansible_env.HOME }}/.config/atuin" # Adjust based on atuin installation
|
|
||||||
|
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
---
|
---
|
||||||
# roles/setup/tasks/hashicorp_vagrant.yml
|
|
||||||
|
|
||||||
- name: Download Hashicorp GPG key
|
- name: Download Hashicorp GPG key
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: https://apt.releases.hashicorp.com/gpg
|
url: https://apt.releases.hashicorp.com/gpg
|
||||||
@@ -14,6 +12,7 @@
|
|||||||
args:
|
args:
|
||||||
creates: /usr/share/keyrings/hashicorp-archive-keyring.gpg
|
creates: /usr/share/keyrings/hashicorp-archive-keyring.gpg
|
||||||
when: hashicorp_gpg_download.changed
|
when: hashicorp_gpg_download.changed
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Remove temporary Hashicorp GPG key file
|
- name: Remove temporary Hashicorp GPG key file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@@ -31,13 +30,16 @@
|
|||||||
codename: "{{ ansible_facts['lsb']['codename'] }}"
|
codename: "{{ ansible_facts['lsb']['codename'] }}"
|
||||||
ansible_architecture: "{{ ansible_facts['architecture'] }}"
|
ansible_architecture: "{{ ansible_facts['architecture'] }}"
|
||||||
when: hashicorp_gpg_download.changed
|
when: hashicorp_gpg_download.changed
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Update apt cache after adding Hashicorp repository
|
- name: Update apt cache after adding Hashicorp repository
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
update_cache: yes
|
update_cache: true
|
||||||
cache_valid_time: 3600 # Cache validity in seconds
|
cache_valid_time: 3600 # Cache validity in seconds
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Install Vagrant
|
- name: Install Vagrant
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: vagrant
|
name: vagrant
|
||||||
state: present
|
state: present
|
||||||
|
become: true
|
||||||
|
|||||||
@@ -16,13 +16,14 @@
|
|||||||
src: "/tmp/lazygit.tar.gz"
|
src: "/tmp/lazygit.tar.gz"
|
||||||
dest: "/tmp"
|
dest: "/tmp"
|
||||||
creates: "/tmp/lazygit"
|
creates: "/tmp/lazygit"
|
||||||
remote_src: yes
|
remote_src: true
|
||||||
|
|
||||||
- name: Install lazygit
|
- name: Install lazygit
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "/tmp/lazygit"
|
src: "/tmp/lazygit"
|
||||||
dest: /usr/local/bin/lazygit
|
dest: /usr/local/bin/lazygit
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Remove lazygit tar.gz and binary
|
- name: Remove lazygit tar.gz and binary
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@@ -31,18 +32,3 @@
|
|||||||
loop:
|
loop:
|
||||||
- "/tmp/lazygit.tar.gz"
|
- "/tmp/lazygit.tar.gz"
|
||||||
- "/tmp/lazygit"
|
- "/tmp/lazygit"
|
||||||
|
|
||||||
- name: Download ripgrep deb
|
|
||||||
ansible.builtin.get_url:
|
|
||||||
url: https://github.com/BurntSushi/ripgrep/releases/download/14.1.0/ripgrep_14.1.0-1_amd64.deb
|
|
||||||
dest: "/tmp/ripgrep_14.1.0-1_amd64.deb"
|
|
||||||
|
|
||||||
- name: Install ripgrep
|
|
||||||
ansible.builtin.apt:
|
|
||||||
deb: "/tmp/ripgrep_14.1.0-1_amd64.deb"
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Remove ripgrep deb
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "/tmp/ripgrep_14.1.0-1_amd64.deb"
|
|
||||||
state: absent
|
|
||||||
40
roles/setup/tasks/ledger_cli.yml
Normal file
40
roles/setup/tasks/ledger_cli.yml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
---
|
||||||
|
- name: Clone Ledger repository
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: "{{ ledger_repo }}"
|
||||||
|
dest: "{{ ledger_clone_dir }}"
|
||||||
|
version: master
|
||||||
|
update: true
|
||||||
|
register: git_clone
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Run acprep update to configure and build Ledger
|
||||||
|
ansible.builtin.command: ./acprep update
|
||||||
|
args:
|
||||||
|
chdir: "{{ ledger_clone_dir }}"
|
||||||
|
when: git_clone.changed
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Move the built ledger binary to /usr/bin
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ ledger_clone_dir }}/ledger"
|
||||||
|
dest: "{{ ledger_binary_path }}"
|
||||||
|
mode: "0755"
|
||||||
|
force: true
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Ensure the ledger binary is executable
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ ledger_binary_path }}"
|
||||||
|
mode: "0755"
|
||||||
|
state: file
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Verify Ledger installation
|
||||||
|
ansible.builtin.command: ledger --version
|
||||||
|
register: ledger_version
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Display Ledger version
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "Ledger version installed: {{ ledger_version.stdout }}"
|
||||||
@@ -4,20 +4,25 @@
|
|||||||
- name: Install snap packages
|
- name: Install snap packages
|
||||||
ansible.builtin.import_tasks: snap.yml
|
ansible.builtin.import_tasks: snap.yml
|
||||||
- name: Install nvim
|
- name: Install nvim
|
||||||
ansible.builtin.import_tasks: nvim_rust.yml
|
ansible.builtin.import_tasks: nvim.yml
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
|
ansible.builtin.import_tasks: rust.yml
|
||||||
- name: Ghostty
|
- name: Ghostty
|
||||||
ansible.builtin.import_tasks: ghostty.yml
|
ansible.builtin.import_tasks: ghostty.yml
|
||||||
- name: Install pacstall
|
- name: Install pacstall
|
||||||
|
ansible.builtin.import_tasks: pacstall.yml
|
||||||
- name: Install ledger
|
- name: Install ledger
|
||||||
ansible.builtin.import_tasks: pacstall_ledger.yml
|
ansible.builtin.import_tasks: ledger_cli.yml
|
||||||
- name: Install git-delta
|
- name: Install git-delta
|
||||||
|
ansible.builtin.import_tasks: git_delta.yml
|
||||||
- name: Install atuin
|
- name: Install atuin
|
||||||
ansible.builtin.import_tasks: git_delta_atuin.yml
|
ansible.builtin.import_tasks: atuin.yml
|
||||||
- name: Install Starship
|
- name: Install Starship
|
||||||
|
ansible.builtin.import_tasks: starship.yml
|
||||||
- name: Install EurKey
|
- name: Install EurKey
|
||||||
|
ansible.builtin.import_tasks: eurkey.yml
|
||||||
- name: Install Veracrypt
|
- name: Install Veracrypt
|
||||||
ansible.builtin.import_tasks: starship_eurkey_veracrypt.yml
|
ansible.builtin.import_tasks: veracrypt.yml
|
||||||
- name: Install FiraCode
|
- name: Install FiraCode
|
||||||
ansible.builtin.import_tasks: fira_code_fonts.yml
|
ansible.builtin.import_tasks: fira_code_fonts.yml
|
||||||
- name: Remove Ubuntu Pro Banner
|
- name: Remove Ubuntu Pro Banner
|
||||||
@@ -29,7 +34,8 @@
|
|||||||
- name: Install paisa.fyi
|
- name: Install paisa.fyi
|
||||||
ansible.builtin.import_tasks: paisa.yml
|
ansible.builtin.import_tasks: paisa.yml
|
||||||
- name: Install lazygit
|
- name: Install lazygit
|
||||||
|
ansible.builtin.import_tasks: lazygit.yml
|
||||||
- name: Install ripgrep
|
- name: Install ripgrep
|
||||||
ansible.builtin.import_tasks: lazygit_ripgrep.yml
|
ansible.builtin.import_tasks: ripgrep.yml
|
||||||
- name: Install Vagrant
|
- name: Install Vagrant
|
||||||
ansible.builtin.import_tasks: hashicorp_vagrant.yml
|
ansible.builtin.import_tasks: hashicorp_vagrant.yml
|
||||||
|
|||||||
25
roles/setup/tasks/nvim.yml
Normal file
25
roles/setup/tasks/nvim.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
- name: Check if Neovim config directory already exists
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: "{{ nvim_config_path }}"
|
||||||
|
register: nvim_config
|
||||||
|
|
||||||
|
- name: Clone LazyVim starter to Neovim config directory
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: https://github.com/LazyVim/starter
|
||||||
|
dest: "{{ nvim_config_path }}"
|
||||||
|
clone: true
|
||||||
|
update: false
|
||||||
|
when: not nvim_config.stat.exists
|
||||||
|
|
||||||
|
- name: Remove .git directory from Neovim config
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ nvim_config_path }}/.git"
|
||||||
|
state: absent
|
||||||
|
when: not nvim_config.stat.exists
|
||||||
|
|
||||||
|
- name: Install neovim npm package globally
|
||||||
|
community.general.npm:
|
||||||
|
name: neovim
|
||||||
|
global: true
|
||||||
|
become: true
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Install neovim npm package globally
|
|
||||||
ansible.general.npm:
|
|
||||||
name: neovim
|
|
||||||
global: true
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: Install Rust (via rustup)
|
|
||||||
ansible.builtin.shell: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
||||||
args:
|
|
||||||
creates: "{{ ansible_env.HOME }}/.cargo/bin/rustc"
|
|
||||||
become: false
|
|
||||||
6
roles/setup/tasks/pacstall.yml
Normal file
6
roles/setup/tasks/pacstall.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- name: Install Pacstall
|
||||||
|
ansible.builtin.shell: yes | bash -c "$(curl -fsSL https://pacstall.dev/q/install)"
|
||||||
|
args:
|
||||||
|
creates: /usr/local/bin/pacstall # Adjust based on pacstall install path
|
||||||
|
become: true
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Install Pacstall
|
|
||||||
ansible.builtin.shell: bash -c "$(curl -fsSL https://pacstall.dev/q/install)"
|
|
||||||
args:
|
|
||||||
creates: /usr/local/bin/pacstall # Adjust based on pacstall install path
|
|
||||||
|
|
||||||
- name: Add Ledger PPA
|
|
||||||
ansible.builtin.apt_repository:
|
|
||||||
repo: ppa:mbudde/ledger
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Update apt cache after adding Ledger PPA
|
|
||||||
ansible.builtin.apt:
|
|
||||||
update_cache: yes
|
|
||||||
|
|
||||||
- name: Install ledger
|
|
||||||
ansible.builtin.apt:
|
|
||||||
name: ledger
|
|
||||||
state: present
|
|
||||||
@@ -3,46 +3,64 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: /etc/apt/sources.list
|
src: /etc/apt/sources.list
|
||||||
dest: /etc/apt/sources.list.bak
|
dest: /etc/apt/sources.list.bak
|
||||||
remote_src: yes
|
remote_src: true
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Add universe repository temporarily
|
- name: Add universe repository temporarily
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/apt/sources.list
|
path: /etc/apt/sources.list
|
||||||
line: "deb http://archive.ubuntu.com/ubuntu jammy main universe"
|
line: "deb http://archive.ubuntu.com/ubuntu jammy main universe"
|
||||||
insertafter: EOF
|
insertafter: EOF
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Update apt cache
|
- name: Update apt cache
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
update_cache: yes
|
update_cache: true
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Upgrade all packages
|
- name: Upgrade all packages
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
upgrade: dist
|
upgrade: dist
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Install dependencies for Paisa
|
- name: Install dependencies for Paisa
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name:
|
name:
|
||||||
- libwebkit2gtk-4.0-dev
|
- libwebkit2gtk-4.0-dev
|
||||||
- webkit2gtk
|
|
||||||
state: present
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
|
# - name: Download webkitgtk tar.gz
|
||||||
|
# ansible.builtin.get_url:
|
||||||
|
# url: "https://webkitgtk.org/releases/webkitgtk-2.46.5.tar.xz"
|
||||||
|
# dest: "/tmp/webkitgtk-2.46.5.tar.xz"
|
||||||
|
#
|
||||||
|
# - name: Extract webkitgtk binary
|
||||||
|
# ansible.builtin.unarchive:
|
||||||
|
# src: "/tmp/webkitgtk-2.46.5.tar.xz"
|
||||||
|
# dest: "/tmp"
|
||||||
|
# creates: "/tmp/webkitgtk-2.46.5/"
|
||||||
|
# remote_src: true
|
||||||
|
|
||||||
- name: Restore original sources.list
|
- name: Restore original sources.list
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: /etc/apt/sources.list.bak
|
src: /etc/apt/sources.list.bak
|
||||||
dest: /etc/apt/sources.list
|
dest: /etc/apt/sources.list
|
||||||
remote_src: yes
|
remote_src: true
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Download Paisa app deb
|
- name: Download Paisa app deb
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: https://github.com/ananthakumaran/paisa/releases/download/v0.7.1/paisa-app-linux-amd64.deb
|
url: "https://github.com/ananthakumaran/paisa/releases/download/v0.7.1/paisa-app-linux-{{ aarch }}.deb"
|
||||||
dest: "/tmp/paisa-app-linux-amd64.deb"
|
dest: "/tmp/paisa-app-linux-{{ aarch }}.deb"
|
||||||
|
|
||||||
- name: Install Paisa
|
- name: Install Paisa
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
deb: "/tmp/paisa-app-linux-amd64.deb"
|
deb: "/tmp/paisa-app-linux-{{ aarch }}.deb"
|
||||||
state: present
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Remove Paisa deb
|
- name: Remove Paisa deb
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "/tmp/paisa-app-linux-amd64.deb"
|
path: "/tmp/paisa-app-linux-{{ aarch }}.deb"
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -13,10 +13,12 @@
|
|||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
deb: "/tmp/protonvpn-stable-release_1.0.6_all.deb"
|
deb: "/tmp/protonvpn-stable-release_1.0.6_all.deb"
|
||||||
state: present
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Update apt cache after ProtonVPN repo added
|
- name: Update apt cache after ProtonVPN repo added
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
update_cache: yes
|
update_cache: true
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Install ProtonVPN GNOME desktop
|
- name: Install ProtonVPN GNOME desktop
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
@@ -26,6 +28,7 @@
|
|||||||
- gir1.2-ayatanaappindicator3-0.1
|
- gir1.2-ayatanaappindicator3-0.1
|
||||||
- gnome-shell-extension-appindicator
|
- gnome-shell-extension-appindicator
|
||||||
state: present
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Remove ProtonVPN release deb
|
- name: Remove ProtonVPN release deb
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
|||||||
@@ -3,12 +3,15 @@
|
|||||||
ansible.builtin.command: mv /etc/apt/apt.conf.d/20apt-esm-hook.conf /etc/apt/apt.conf.d/20apt-esm-hook.conf.bak
|
ansible.builtin.command: mv /etc/apt/apt.conf.d/20apt-esm-hook.conf /etc/apt/apt.conf.d/20apt-esm-hook.conf.bak
|
||||||
args:
|
args:
|
||||||
removes: /etc/apt/apt.conf.d/20apt-esm-hook.conf
|
removes: /etc/apt/apt.conf.d/20apt-esm-hook.conf
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Create empty Ubuntu Pro banner configuration
|
- name: Create empty Ubuntu Pro banner configuration
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /etc/apt/apt.conf.d/20apt-esm-hook.conf
|
path: /etc/apt/apt.conf.d/20apt-esm-hook.conf
|
||||||
state: touch
|
state: touch
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Update apt cache
|
- name: Update apt cache
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
update_cache: yes
|
update_cache: true
|
||||||
|
become: true
|
||||||
|
|||||||
15
roles/setup/tasks/ripgrep.yml
Normal file
15
roles/setup/tasks/ripgrep.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
- name: Download ripgrep deb
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: https://github.com/BurntSushi/ripgrep/releases/download/14.1.0/ripgrep_14.1.0-1_{{ aarch }}.deb
|
||||||
|
dest: "/tmp/ripgrep_14.1.0-1_{{ aarch }}.deb"
|
||||||
|
|
||||||
|
- name: Install ripgrep
|
||||||
|
ansible.builtin.apt:
|
||||||
|
deb: "/tmp/ripgrep_14.1.0-1_{{ aarch }}.deb"
|
||||||
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Remove ripgrep deb
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "/tmp/ripgrep_14.1.0-1_{{ aarch }}.deb"
|
||||||
|
state: absent
|
||||||
5
roles/setup/tasks/rust.yml
Normal file
5
roles/setup/tasks/rust.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- name: Install Rust (via rustup)
|
||||||
|
ansible.builtin.shell: yes | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs
|
||||||
|
args:
|
||||||
|
creates: "{{ ansible_env.HOME }}/.cargo/bin/rustc"
|
||||||
@@ -1,26 +1,8 @@
|
|||||||
---
|
---
|
||||||
- name: Install snap packages - bottom
|
- name: Install snap packages
|
||||||
ansible.general.snap:
|
community.general.snap:
|
||||||
name: bottom
|
name: "{{ item.name }}"
|
||||||
state: present
|
classic: "{{ item.classic }}"
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: Install snap packages - signal-desktop
|
|
||||||
ansible.general.snap:
|
|
||||||
name: signal-desktop
|
|
||||||
state: present
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: Install snap packages - nvim
|
|
||||||
ansible.general.snap:
|
|
||||||
name: nvim
|
|
||||||
classic: true
|
|
||||||
state: present
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: Install snap packages - zellij
|
|
||||||
ansible.general.snap:
|
|
||||||
name: zellij
|
|
||||||
classic: true
|
|
||||||
state: present
|
state: present
|
||||||
become: true
|
become: true
|
||||||
|
loop: "{{ snap_tools }}"
|
||||||
|
|||||||
5
roles/setup/tasks/starship.yml
Normal file
5
roles/setup/tasks/starship.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- name: Install starship
|
||||||
|
ansible.builtin.shell: yes | bash -c "curl -sS https://starship.rs/install.sh"
|
||||||
|
args:
|
||||||
|
creates: "{{ ansible_env.HOME }}/.config/starship.toml" # Adjust based on where starship installs
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Install starship
|
|
||||||
become: false
|
|
||||||
ansible.builtin.shell: curl -sS https://starship.rs/install.sh | sh -s -- -y
|
|
||||||
args:
|
|
||||||
creates: "{{ ansible_env.HOME }}/.config/starship.toml" # Adjust based on where starship installs
|
|
||||||
|
|
||||||
- name: Download EurKey deb
|
|
||||||
ansible.builtin.get_url:
|
|
||||||
url: https://eurkey.steffen.bruentjen.eu/download/debian/eurkey.deb
|
|
||||||
dest: "/tmp/eurkey.deb"
|
|
||||||
|
|
||||||
- name: Install EurKey
|
|
||||||
ansible.builtin.apt:
|
|
||||||
deb: "/tmp/eurkey.deb"
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Remove EurKey deb
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "/tmp/eurkey.deb"
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Download Veracrypt deb
|
|
||||||
ansible.builtin.get_url:
|
|
||||||
url: https://launchpad.net/veracrypt/trunk/1.26.14/+download/veracrypt-1.26.14-Debian-12-amd64.deb
|
|
||||||
dest: "/tmp/veracrypt.deb"
|
|
||||||
|
|
||||||
- name: Install Veracrypt
|
|
||||||
ansible.builtin.apt:
|
|
||||||
deb: "/tmp/veracrypt.deb"
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Remove Veracrypt deb
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "/tmp/veracrypt.deb"
|
|
||||||
state: absent
|
|
||||||
16
roles/setup/tasks/veracrypt.yml
Normal file
16
roles/setup/tasks/veracrypt.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
- name: Download Veracrypt deb
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: "https://launchpad.net/veracrypt/trunk/1.26.14/+download/veracrypt-1.26.14-Debian-12-{{ aarch }}.deb"
|
||||||
|
dest: "/tmp/veracrypt.deb"
|
||||||
|
|
||||||
|
- name: Install Veracrypt
|
||||||
|
ansible.builtin.apt:
|
||||||
|
deb: "/tmp/veracrypt.deb"
|
||||||
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Remove Veracrypt deb
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "/tmp/veracrypt.deb"
|
||||||
|
state: absent
|
||||||
73
roles/setup/vars/main.yml
Normal file
73
roles/setup/vars/main.yml
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
apt_dependencies:
|
||||||
|
- ansible
|
||||||
|
- bat
|
||||||
|
- build-essential
|
||||||
|
- cmake
|
||||||
|
- curl
|
||||||
|
- doxygen
|
||||||
|
- eza
|
||||||
|
- fd-find
|
||||||
|
- fzf
|
||||||
|
- gcc
|
||||||
|
- gettext
|
||||||
|
- git
|
||||||
|
- libarchive-tools
|
||||||
|
- libboost-date-time-dev
|
||||||
|
- libboost-dev
|
||||||
|
- libboost-filesystem-dev
|
||||||
|
- libboost-iostreams-dev
|
||||||
|
- libboost-python-dev
|
||||||
|
- libboost-regex-dev
|
||||||
|
- libboost-system-dev
|
||||||
|
- libboost-test-dev
|
||||||
|
- libclang-dev
|
||||||
|
- libedit-dev
|
||||||
|
- libgmp3-dev
|
||||||
|
- libmpfr-dev
|
||||||
|
- libssl-dev
|
||||||
|
- luarocks
|
||||||
|
- npm
|
||||||
|
- python3-dev
|
||||||
|
- python3-ipykernel
|
||||||
|
- python3-pip
|
||||||
|
- python3-venv
|
||||||
|
- texinfo
|
||||||
|
- tzdata
|
||||||
|
- v4l2loopback-dkms
|
||||||
|
- xsel
|
||||||
|
|
||||||
|
apt_tools:
|
||||||
|
- keepassxc
|
||||||
|
- obs-studio
|
||||||
|
- p7zip
|
||||||
|
- pkg-config
|
||||||
|
- ranger
|
||||||
|
- tealdeer
|
||||||
|
- texlive-full
|
||||||
|
- virtualbox
|
||||||
|
- wireguard-tools
|
||||||
|
- zsh
|
||||||
|
|
||||||
|
snap_tools:
|
||||||
|
- name: "bottom"
|
||||||
|
classic: false
|
||||||
|
- name: "signal-desktop"
|
||||||
|
classic: false
|
||||||
|
- name: "nvim"
|
||||||
|
classic: true
|
||||||
|
- name: "zellij"
|
||||||
|
classic: true
|
||||||
|
- name: "jupyterlab-desktop"
|
||||||
|
classic: true
|
||||||
|
|
||||||
|
nvim_config_path: "~/.config/nvim"
|
||||||
|
|
||||||
|
ledger_repo: "https://github.com/ledger/ledger.git"
|
||||||
|
ledger_clone_dir: "/opt/ledger"
|
||||||
|
ledger_binary_path: "/usr/bin/ledger"
|
||||||
|
|
||||||
|
docker:
|
||||||
|
url: "https://download.docker.com/linux"
|
||||||
|
apt_release_channel: "stable"
|
||||||
|
|
||||||
|
aarch: "{{ 'arm64' if ansible_architecture == 'aarch64' else 'amd64' }}"
|
||||||
Reference in New Issue
Block a user