Ansible Playbook to setup my workstation
On an Ubuntu 24.04 LTS (Noble Numbat):
sudo apt update && sudo apt upgrade --yes
sudo apt install pipx --yes
pipx ensurepath
pipx install ansible-core
sudo apt install git --yes
git clone https://github.com/pascal-sun/setup.git
cd setup/
ansible-galaxy install --role-file requirements.yml
ansible-playbook playbook.yml --ask-become-pass
BECOME password: <Enter your password>
And that's it! π
- Bitwarden: At home, at work, or on the go, Bitwarden easily secures all your passwords, passkeys, and sensitive information.
- Sidebery: Vertical tabs tree and bookmarks in sidebar with advanced containers configuration, grouping and many other features.
- Vimium: The Hacker's Browser. Vimium provides keyboard shortcuts for navigation and control in the spirit of Vim.
- Install, clean and plugins:
nvim :Lazy sync
- Or from command-line:
nvim --headless "+Lazy! sync" +qa
- Copy the SSH public key to your clipboard:
cat ~/.ssh/id_ed25519.pub
- Go to GitHub, then Settings > SSH and GPG keys > New SSH key
- Add Authentication and Signing keys, and paste the SSH public key
- Launch Toolbox with app launcher:
super
+space
and searchJetBrains Toolbox
- (or from terminal:
$HOME/.local/share/JetBrains/Toolbox/bin/jetbrains-toolbox
) - Install desired tools, such as
PyCharm Professional
- Install resources (~1GB) and
full
image (~60GB):exegol install
- Follow instruction
Warning
Downloading takes a long time...
With act
act --env RUNNER_DEBUG=1 --job with-github-runner
act --env RUNNER_DEBUG=1 --job with-docker-container
Caution
With act, it does not possible to use snapd
. Therefore packages intalled with snap
(tagged with installed_with_snap
) are skipped.
Just push the code, and check GitHub Action
Docker
On Linux, you have the choice between Docker Engine and Docker Desktop (which isn't the case for macOS and Windows: Docker Desktop is the only choice, as a VM on Linux is mandatory).
π’ Docker Engine is the core software that enables containerization,
which includes the Docker daemon dockerd
, the command-line interface docker
and APIs to talk to the Docker daemon.
It's free, easier to install with the Docker repository, and it's less consuming in terms of resources, as
it includes only essential components and runs directly on the operating system.
π΄ Docker Desktop is a package of tools, which includes Docker Engine, Docker Extensions, Docker Compose, Kubernetes, etc. (stuff that I don't need) and a graphical interface. Due to the additional components and the use of a Virtual Machine (even on Linux), it can be more consuming in terms of resources than Docker Engine alone.
The Docker Engine and the CLI are enough for my use, and if not, can use the Docker interface of Jetbrains IDEs instead of the Docker Desktop.
Python
pip
is a package installer for Python, and is automatically installed if you're working in a virtual environment.
As pipx
and venv
are used, python3-pip
is not necessary outside a virtual environment,
so install python3-pip
is not required.
venv
is integrated into the standard library module since python3.3
, and is used to create virtual environments.
The installation of python3-venv
is done by default when Python is installed.
However, on Debian/Ubuntu (and derivatives), python3-venv
is not installed by default: you must install manually, to
use tool like pipx
(https://pipx.pypa.io/stable/troubleshooting/#debian-ubuntu-issues.
Python has many package and virtual environment managers:
- https://dublog.net/blog/so-many-python-package-managers/
- https://stackoverflow.com/questions/41573587/what-is-the-difference-between-venv-pyvenv-pyenv-virtualenv-virtualenvwrappe
π’ pip is the "default" package installer for Python, and specifies package
dependencies in a requirements.txt
file.
Ideal for a small to medium project, with a small number of dependencies.
However, it does not manage dependency conflicts and virtual environments (need other tools, such as virtualenv
or venv
)
π’ poetry is a newer popular package manager and specifies package
dependencies in a pyproject.toml
file.
Best choice for a larger and more complex project, with a large number of dependencies.
It manages virtual environments, from its built-in environment manager, or from external environment manager
(such as virtualenv
or venv
).
And it resolves dependency conflicts... but slowly.
π΄ pdm and hatch, very similar to poetry
but
less
popular, so didn't test...
π΄ conda and mamba, I'm not a data scientist so...
π‘ uv is an extremely fast Python package installer and resolver, written in Rust, and designed as a drop-in replacement for pip. But it is no stable for now (but keep an eye on... π)
-
pyenv
is used to switch between multiple versions of Python, and also install multiple Python versions# Installation curl https://pyenv.run | bash # Usage pyenv install 3.10 pyenv local 3.10
-
asdf
is used to manage and switch multiple language versions (it's likepyenv
, but for other languages also)# Installation git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0 # Usage asdf plugin add python asdf install python 3.10.14 # need to be very specific asdf local python 3.10.14
-
β
mise
, is likeasdf
, but faster and easier to use (and has additional features)# Installation curl https://mise.run | sh # Usage mise use [email protected]
-
virtualenv
is a popular tool maintained by PyPA, to create virtual environments forpython2
andpython3
# Installation pipx install virtualenv # Usage virtualenv my_env --python=python2.7
-
pipenv
is a mixture withpip
andvirtualenv
-
venv
is a standard library to create virtual environments (with less feature thanvirtualenv
, such as creating virtual environments for arbitrarily installed python versions)# Usage python3 -m venv my_env
- π΄ Cannot with different version of Python, and especially
python2
- π΄ Cannot with different version of Python, and especially
- bottom or htop?
- autoclean, autoremove, purge, etc. on apt packages?
- onlyoffice, libreoffice, freeoffice, wps office, openoffice, calligra office, gnome office, .etc
- Google Chrome
- mise plugins:
- act
- bat
- bat-extract
- bottom
- Starship? Or Pure?
- Add flameshot shortcut
- mypy
- mise with python2 (https://github.com/pyenv/pyenv/wiki/Common-build-problems#error-the-python-ssl-extension-was-not-compiled-missing-the-openssl-lib)
- virtualenv not usefull with pipx (install with python2)
- ghostty
- flatpak