Skip to content

Instantly share code, notes, and snippets.

View cweiland's full-sized avatar

Christophe WEILAND cweiland

View GitHub Profile
@cweiland
cweiland / ansible-wsl.md
Created August 10, 2025 07:16 — forked from Tes3awy/ansible-wsl.md
Install Ansible (ansible [core 2.11.6]) on Windows Subsystem for Linux (WSL) and run your first playbook

Install Ansible release (Recommended)

The Windows Subsystem for Linux (WSL) is not officially supported by Ansible and should not be used for production.

$ sudo apt update && sudo apt upgrade -y
$ sudo apt install python3-pip git libffi-dev libssl-dev -y
$ pip3 install --user ansible pywinrm # pywinrm is a Python client for the Windows Remote Management (WinRM) service
# Setting up Proxmox with a certificate from FreeIPA.
# This assumes you've already joined the machine with ipa-client-install
# Get a ticket as someone that can issue certificates
kinit admin
cat <<EOF > /usr/local/sbin/set-ssl-permissions
#!/bin/bash
FILES=(/etc/pve/nodes/$(hostname)/{pve-ssl.key,pve-ssl.pem})
#!/bin/bash
WINDOWS_USER="<windows_user>"
sudo apt update
sudo apt install build-essential flex bison libssl-dev libelf-dev bc libncurses-dev autoconf libudev-dev libtool dwarves -y
WSLKERNEL=$(uname -a | cut -d " " -f3 | cut -d "-" -f1)
CHECKOUT_DIR="linux-msft-wsl-${WSLKERNEL}"
export WSLKERNEL
export CHECKOUT_DIR
export WINDOWS_USER
@cweiland
cweiland / get_snds_data.py
Created June 1, 2019 07:58 — forked from mkubenka/get_snds_data.py
Download Outlook Smart Network Data Service Data for last 90 days
# Enable automated data access under https://postmaster.live.com/snds/auto.aspx
import datetime
import requests
import shutil
DATA_URL = 'https://postmaster.live.com/snds/data.aspx?key=xx'
for i in range(90):
date = datetime.datetime.now() + datetime.timedelta(-i)