Skip to content

Instantly share code, notes, and snippets.

View boileaum's full-sized avatar

Matthieu Boileau boileaum

  • CNRS
  • Strasbourg
View GitHub Profile
@boileaum
boileaum / install-salt-minion.sh
Last active April 19, 2018 12:53
A bash script to install a Salt minion
#!/bin/bash
if [ "$EUID" -ne 0 ]
then
echo "Please run as root"
exit
fi
# From Saltstack documentation https://docs.saltstack.com/en/latest/topics/tutorials/quickstart.html
cd /tmp
@boileaum
boileaum / gitlab_pages.py
Last active December 9, 2022 09:34
A script to list currently published GitLab Pages projects
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
A script to list currently published GitLab Pages projects
(to be run by admin on GitLab server)
"""
import os
from pathlib import Path
@boileaum
boileaum / minions-report.py
Last active April 22, 2018 11:38
A python3 script to get available security updates and "reboot required" from Ubuntu/Redhat minions using Saltstack. Send report by email if asked (typically to work as a cron).
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Report security updates and reboot required using saltstack
"""
import argparse
from collections import OrderedDict
from email.mime.text import MIMEText
import smtplib
import socket