Compare commits

...

2 Commits

Author SHA1 Message Date
cb3be3acd9 Added easier run with sudo command 2026-02-01 14:30:51 +01:00
c3c44f0bf9 Updated WSL Setup Instructions 2026-02-01 13:26:28 +01:00

View File

@@ -17,7 +17,7 @@ ansible-playbook playbooks/<playbook_name>.yml
run a playbook with sudo: run a playbook with sudo:
```bash ```bash
ansible-playbook playbooks/<playbook_name>.yml --ask-become-pass ansible-playbook playbooks/<playbook_name>.yml -K
``` ```
## WSL Setup Instructions ## WSL Setup Instructions
@@ -25,6 +25,8 @@ ansible-playbook playbooks/<playbook_name>.yml --ask-become-pass
To use Ansible on Windows, you need to set up Windows Subsystem for Linux (WSL). To use Ansible on Windows, you need to set up Windows Subsystem for Linux (WSL).
You then have the option to open a local Folder in VSCode and open a WSL terminal that points to the same folder under WSL. You then have the option to open a local Folder in VSCode and open a WSL terminal that points to the same folder under WSL.
----
To enable proper file permissions for Ansible on WSL, you need to configure the WSL automount settings. To enable proper file permissions for Ansible on WSL, you need to configure the WSL automount settings.
```bash ```bash
@@ -39,12 +41,6 @@ enabled = true
options = "metadata,umask=022,fmask=0111" options = "metadata,umask=022,fmask=0111"
``` ```
restart WSL:
```bash
wsl --shutdown
```
If you use a Network Drive, you have to mount it manually: If you use a Network Drive, you have to mount it manually:
```bash ```bash
@@ -64,10 +60,10 @@ Reload fstab:
sudo mount -a sudo mount -a
``` ```
Remove others write permissions: Remove others write permissions in your project folder:
```bash ```bash
chmod -R o-w . sudo chmod -R o-w .
``` ```
---- ----
@@ -76,9 +72,7 @@ Install Ansible on WSL:
```bash ```bash
sudo apt update sudo apt update
sudo apt install python3-pip pipx sudo apt install ansible ssh-askpass
sudo pipx install ansible
sudo apt install ssh-askpass
``` ```
Add SSH Keys from Windows to WSL: Add SSH Keys from Windows to WSL:
@@ -89,3 +83,9 @@ chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub chmod 644 ~/.ssh/id_rsa.pub
``` ```
Lastly, restart WSL to apply the changes:
```bash
sudo shutdown -r now
```