refactor(lint,fqdn-names): Full FQDN names for modules
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Install apt packages
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- ansible
|
||||
- bat
|
||||
@@ -28,7 +28,8 @@
|
||||
- xsel
|
||||
- zsh
|
||||
state: present
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
become: true
|
||||
|
||||
- name: Update tldr database
|
||||
command: tldr --update
|
||||
ansible.builtin.command: tldr --update
|
||||
|
||||
@@ -1,36 +1,37 @@
|
||||
---
|
||||
- name: Install prerequisites for Docker
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- ca-certificates
|
||||
- curl
|
||||
state: present
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
become: true
|
||||
|
||||
- name: Create /etc/apt/keyrings directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: /etc/apt/keyrings
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: Download Docker GPG key
|
||||
get_url:
|
||||
ansible.builtin.get_url:
|
||||
url: https://download.docker.com/linux/ubuntu/gpg
|
||||
dest: /etc/apt/keyrings/docker.asc
|
||||
mode: "0644"
|
||||
|
||||
- name: Add Docker repository
|
||||
apt_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
|
||||
apt:
|
||||
update_cache: yes
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
|
||||
- name: Install Docker packages
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- docker-ce
|
||||
- docker-ce-cli
|
||||
@@ -40,7 +41,7 @@
|
||||
state: present
|
||||
|
||||
- name: Add current user to docker group
|
||||
user:
|
||||
ansible.builtin.user:
|
||||
name: "{{ ansible_user_id }}"
|
||||
groups: docker
|
||||
append: yes
|
||||
append: true
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
---
|
||||
- name: Create fonts directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ ansible_env.HOME }}/.fonts"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: Download FiraCode Nerd Font zip
|
||||
get_url:
|
||||
ansible.builtin.get_url:
|
||||
url: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/FiraMono.zip
|
||||
dest: "/tmp/FiraMono.zip"
|
||||
|
||||
- name: Extract FiraCode from zip
|
||||
unarchive:
|
||||
ansible.builtin.unarchive:
|
||||
src: "/tmp/FiraMono.zip"
|
||||
dest: "{{ ansible_env.HOME }}/.fonts"
|
||||
remote_src: yes
|
||||
|
||||
- name: Remove FiraMono.zip
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "/tmp/FiraMono.zip"
|
||||
state: absent
|
||||
|
||||
- name: Refresh font cache
|
||||
shell: fc-cache -fv
|
||||
ansible.builtin.shell: fc-cache -fv
|
||||
args:
|
||||
warn: false
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
---
|
||||
- name: Get OS release info
|
||||
shell: source /etc/os-release && echo $VERSION_ID
|
||||
ansible.builtin.shell: source /etc/os-release && echo $VERSION_ID
|
||||
register: version_id
|
||||
changed_when: false
|
||||
|
||||
- name: Get Ghostty DEB URL
|
||||
shell: |
|
||||
ansible.builtin.shell: |
|
||||
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"
|
||||
register: ghostty_deb_url
|
||||
changed_when: false
|
||||
|
||||
- name: Download Ghostty deb file
|
||||
get_url:
|
||||
ansible.builtin.get_url:
|
||||
url: "{{ ghostty_deb_url.stdout }}"
|
||||
dest: "/tmp/{{ ghostty_deb_url.stdout | basename }}"
|
||||
mode: "0755"
|
||||
|
||||
- name: Install Ghostty
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
deb: "/tmp/{{ ghostty_deb_url.stdout | basename }}"
|
||||
state: present
|
||||
|
||||
- name: Remove Ghostty deb file
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "/tmp/{{ ghostty_deb_url.stdout | basename }}"
|
||||
state: absent
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
---
|
||||
- name: Download git-delta deb
|
||||
get_url:
|
||||
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
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
deb: "/tmp/git-delta-musl_0.18.2_amd64.deb"
|
||||
state: present
|
||||
|
||||
- name: Remove git-delta deb
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "/tmp/git-delta-musl_0.18.2_amd64.deb"
|
||||
state: absent
|
||||
|
||||
- name: Install atuin
|
||||
become: false
|
||||
shell: curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh
|
||||
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,31 +1,31 @@
|
||||
---
|
||||
- name: Get latest lazygit version
|
||||
shell: |
|
||||
ansible.builtin.shell: |
|
||||
curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" |
|
||||
grep -Po '"tag_name": *"v\K[^"]*'
|
||||
register: lazygit_version
|
||||
changed_when: false
|
||||
|
||||
- name: Download lazygit tar.gz
|
||||
get_url:
|
||||
ansible.builtin.get_url:
|
||||
url: "https://github.com/jesseduffield/lazygit/releases/download/v{{ lazygit_version.stdout }}/lazygit_{{ lazygit_version.stdout }}_Linux_x86_64.tar.gz"
|
||||
dest: "/tmp/lazygit.tar.gz"
|
||||
|
||||
- name: Extract lazygit binary
|
||||
unarchive:
|
||||
ansible.builtin.unarchive:
|
||||
src: "/tmp/lazygit.tar.gz"
|
||||
dest: "/tmp"
|
||||
creates: "/tmp/lazygit"
|
||||
remote_src: yes
|
||||
|
||||
- name: Install lazygit
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: "/tmp/lazygit"
|
||||
dest: /usr/local/bin/lazygit
|
||||
mode: "0755"
|
||||
|
||||
- name: Remove lazygit tar.gz and binary
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
loop:
|
||||
@@ -33,16 +33,16 @@
|
||||
- "/tmp/lazygit"
|
||||
|
||||
- name: Download ripgrep deb
|
||||
get_url:
|
||||
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
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
deb: "/tmp/ripgrep_14.1.0-1_amd64.deb"
|
||||
state: present
|
||||
|
||||
- name: Remove ripgrep deb
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "/tmp/ripgrep_14.1.0-1_amd64.deb"
|
||||
state: absent
|
||||
|
||||
@@ -1,15 +1,35 @@
|
||||
---
|
||||
- import_tasks: apt.yml
|
||||
- import_tasks: snap.yml
|
||||
- import_tasks: nvim_rust.yml
|
||||
- import_tasks: ghostty.yml
|
||||
- import_tasks: pacstall_ledger.yml
|
||||
- import_tasks: git_delta_atuin.yml
|
||||
- import_tasks: starship_eurkey_veracrypt.yml
|
||||
- import_tasks: fira_code_fonts.yml
|
||||
- import_tasks: remove_ubuntu_banner.yml
|
||||
- import_tasks: protonvpn.yml
|
||||
- import_tasks: docker.yml
|
||||
- import_tasks: paisa.yml
|
||||
- import_tasks: lazygit_ripgrep.yml
|
||||
- import_tasks: hashicorp_vagrant.yml
|
||||
- name: Install apt packages
|
||||
ansible.builtin.import_tasks: apt.yml
|
||||
- name: Install snap packages
|
||||
ansible.builtin.import_tasks: snap.yml
|
||||
- name: Install nvim
|
||||
ansible.builtin.import_tasks: nvim_rust.yml
|
||||
- name: Install Rust
|
||||
- name: Ghostty
|
||||
ansible.builtin.import_tasks: ghostty.yml
|
||||
- name: Install pacstall
|
||||
- name: Install ledger
|
||||
ansible.builtin.import_tasks: pacstall_ledger.yml
|
||||
- name: Install git-delta
|
||||
- name: Install atuin
|
||||
ansible.builtin.import_tasks: git_delta_atuin.yml
|
||||
- name: Install Starship
|
||||
- name: Install EurKey
|
||||
- name: Install Veracrypt
|
||||
ansible.builtin.import_tasks: starship_eurkey_veracrypt.yml
|
||||
- name: Install FiraCode
|
||||
ansible.builtin.import_tasks: fira_code_fonts.yml
|
||||
- name: Remove Ubuntu Pro Banner
|
||||
ansible.builtin.import_tasks: remove_ubuntu_banner.yml
|
||||
- name: Install ProtonVPN
|
||||
ansible.builtin.import_tasks: protonvpn.yml
|
||||
- name: Install Docker
|
||||
ansible.builtin.import_tasks: docker.yml
|
||||
- name: Install paisa.fyi
|
||||
ansible.builtin.import_tasks: paisa.yml
|
||||
- name: Install lazygit
|
||||
- name: Install ripgrep
|
||||
ansible.builtin.import_tasks: lazygit_ripgrep.yml
|
||||
- name: Install Vagrant
|
||||
ansible.builtin.import_tasks: hashicorp_vagrant.yml
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
- name: Install neovim npm package globally
|
||||
npm:
|
||||
ansible.builtin.npm:
|
||||
name: neovim
|
||||
global: yes
|
||||
|
||||
- name: Install Rust (via rustup)
|
||||
become: false
|
||||
shell: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
ansible.builtin.shell: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
args:
|
||||
creates: "{{ ansible_env.HOME }}/.cargo/bin/rustc"
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
---
|
||||
- name: Install Pacstall
|
||||
shell: bash -c "$(curl -fsSL https://pacstall.dev/q/install)"
|
||||
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
|
||||
apt_repository:
|
||||
ansible.builtin.apt_repository:
|
||||
repo: ppa:mbudde/ledger
|
||||
state: present
|
||||
|
||||
- name: Update apt cache after adding Ledger PPA
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
|
||||
- name: Install ledger
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: ledger
|
||||
state: present
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
---
|
||||
- name: Backup current sources.list
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: /etc/apt/sources.list
|
||||
dest: /etc/apt/sources.list.bak
|
||||
remote_src: yes
|
||||
|
||||
- name: Add universe repository temporarily
|
||||
lineinfile:
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/apt/sources.list
|
||||
line: "deb http://archive.ubuntu.com/ubuntu jammy main universe"
|
||||
insertafter: EOF
|
||||
|
||||
- name: Update apt cache
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
|
||||
- name: Upgrade all packages
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
upgrade: dist
|
||||
|
||||
- name: Install dependencies for Paisa
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- libwebkit2gtk-4.0-dev
|
||||
- webkit2gtk
|
||||
state: present
|
||||
|
||||
- name: Restore original sources.list
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: /etc/apt/sources.list.bak
|
||||
dest: /etc/apt/sources.list
|
||||
remote_src: yes
|
||||
|
||||
- name: Download Paisa app deb
|
||||
get_url:
|
||||
ansible.builtin.get_url:
|
||||
url: https://github.com/ananthakumaran/paisa/releases/download/v0.7.1/paisa-app-linux-amd64.deb
|
||||
dest: "/tmp/paisa-app-linux-amd64.deb"
|
||||
|
||||
- name: Install Paisa
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
deb: "/tmp/paisa-app-linux-amd64.deb"
|
||||
state: present
|
||||
|
||||
- name: Remove Paisa deb
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "/tmp/paisa-app-linux-amd64.deb"
|
||||
state: absent
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
---
|
||||
- name: Download ProtonVPN release deb
|
||||
get_url:
|
||||
ansible.builtin.get_url:
|
||||
url: https://repo.protonvpn.com/debian/dists/stable/main/binary-all/protonvpn-stable-release_1.0.6_all.deb
|
||||
dest: "/tmp/protonvpn-stable-release_1.0.6_all.deb"
|
||||
|
||||
- name: Verify ProtonVPN deb checksum
|
||||
shell: echo "e5e03976d0980bafdf07da2f71b14fbc883c091e72b16772199742c98473002f /tmp/protonvpn-stable-release_1.0.6_all.deb" | sha256sum --check -
|
||||
ansible.builtin.shell: echo "e5e03976d0980bafdf07da2f71b14fbc883c091e72b16772199742c98473002f /tmp/protonvpn-stable-release_1.0.6_all.deb" | sha256sum --check -
|
||||
register: checksum_result
|
||||
failed_when: "'FAILED' in checksum_result.stdout"
|
||||
|
||||
- name: Install ProtonVPN release package
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
deb: "/tmp/protonvpn-stable-release_1.0.6_all.deb"
|
||||
state: present
|
||||
|
||||
- name: Update apt cache after ProtonVPN repo added
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
|
||||
- name: Install ProtonVPN GNOME desktop
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- proton-vpn-gnome-desktop
|
||||
- libayatana-appindicator3-1
|
||||
@@ -28,6 +28,6 @@
|
||||
state: present
|
||||
|
||||
- name: Remove ProtonVPN release deb
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "/tmp/protonvpn-stable-release_1.0.6_all.deb"
|
||||
state: absent
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
---
|
||||
- name: Backup Ubuntu Pro banner configuration
|
||||
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:
|
||||
removes: /etc/apt/apt.conf.d/20apt-esm-hook.conf
|
||||
|
||||
- name: Create empty Ubuntu Pro banner configuration
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: /etc/apt/apt.conf.d/20apt-esm-hook.conf
|
||||
state: touch
|
||||
|
||||
- name: Update apt cache
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
---
|
||||
- name: Install snap packages - bottom
|
||||
snap:
|
||||
ansible.builtin.snap:
|
||||
name: bottom
|
||||
state: present
|
||||
|
||||
- name: Install snap packages - signal-desktop
|
||||
snap:
|
||||
ansible.builtin.snap:
|
||||
name: signal-desktop
|
||||
state: present
|
||||
|
||||
- name: Install snap packages - nvim
|
||||
snap:
|
||||
ansible.builtin.snap:
|
||||
name: nvim
|
||||
classic: true
|
||||
state: present
|
||||
|
||||
- name: Install snap packages - zellij
|
||||
snap:
|
||||
ansible.builtin.snap:
|
||||
name: zellij
|
||||
classic: true
|
||||
state: present
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
---
|
||||
- name: Install starship
|
||||
become: false
|
||||
shell: curl -sS https://starship.rs/install.sh | sh -s -- -y
|
||||
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
|
||||
get_url:
|
||||
ansible.builtin.get_url:
|
||||
url: https://eurkey.steffen.bruentjen.eu/download/debian/eurkey.deb
|
||||
dest: "/tmp/eurkey.deb"
|
||||
|
||||
- name: Install EurKey
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
deb: "/tmp/eurkey.deb"
|
||||
state: present
|
||||
|
||||
- name: Remove EurKey deb
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "/tmp/eurkey.deb"
|
||||
state: absent
|
||||
|
||||
- name: Download Veracrypt deb
|
||||
get_url:
|
||||
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
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
deb: "/tmp/veracrypt.deb"
|
||||
state: present
|
||||
|
||||
- name: Remove Veracrypt deb
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "/tmp/veracrypt.deb"
|
||||
state: absent
|
||||
|
||||
Reference in New Issue
Block a user