Ansible Utils Commands

NB: As an example, the machines are defined in file inventory.yaml with the following content: # VMs all: hosts: vm01: vm02: vm03: vm04: vm05: vm06: # Groups dev: hosts: vm01: vm02: test: hosts: vm03: vm04: prod: hosts: vm05: vm06: # Parent Groups lan: children: dev: test: wan: children: prod: ⚠ If you did not name your inventory file inventory.yaml at root folder, you’ll need to add the argument -i <inventory_filename> to all the commands in the following post....

August 23, 2024 · 2 min

Play steam games remotely using moonlight/sunshine or steam link and wake-on-lan

Goal My goal here is to be able to play remotely from a portable device (laptop, tablet or phone) on my PC with a graphic card. I used steamlink first to play through the Internet. It worked well and did not need to have additional setup (no vpn or additional port in/out manual setup on my computer or router). Unfortunately, on my last macOS update, steamlink kept crashing after the update....

July 28, 2024 · 3 min

Troubleshoot Wsl Issues

Change mode/rights of Windows files in WSL Symptoms: By default, if you try to chmod your files hosted on windows in WSL, it won’t change anything e.g. ls -l /mnt/c/userid/.ssh/vault_pass.txt -rwxrwxrwx 1 userid userid 34 Nov 22 14:21 /mnt/c/userid/.ssh/vault_pass.txt chmod 400 /mnt/c/userid/.ssh/vault_pass.txt ls -l /mnt/c/userid/.ssh/vault_pass.txt -rwxrwxrwx 1 userid userid 34 Nov 22 14:21 /mnt/c/userid/.ssh/vault_pass.txt It can be particularly painful for keys since they cannot be too permissive e.g. for a ssh key...

April 21, 2024 · 2 min

SSH Getting Started

Generate key ssh-keygen -t ed25519 -C "your_email@example.com" Copy key to server ssh-copy-id -i .ssh/id_ed25519.pub <server_name> Connect to server ssh -i ~/.ssh/id_ed25519 <user>@<server_name> Avoid retyping passphrase on each new connection eval $(ssh-agent -s) ssh-add /mnt/c/Users/f.tith/.ssh/id_ed25519 It is only valid in one session. On terminal kill, you’ll need to rerun those commands. Sources https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key

February 21, 2024 · 1 min

Git Usual Commands

This page describe the usual git commands I used on daily, weekly or monthly basis. Daily push git add -u git commit -m "<changes description>" git push [<remote>] [<branch>] e.g. git add -u git commit -m "add feature" git push origin main Update feature branch from base branch Scenario: you are working on your feature branch ‘dev’ and made a Pull Request targeting ‘main’ as base. Unfortunately, someone pushed changes on the base branch ‘main’ and your feature branch ‘dev’ is “Out-Of-Date”....

February 4, 2024 · 2 min