Skip to content

Instantly share code, notes, and snippets.

View adarobin's full-sized avatar

Adam Robinson adarobin

View GitHub Profile
@jturel
jturel / gist:c001c0548cfe64a5b9950711752cdf7f
Last active February 5, 2020 19:53
Generate Swagger definitions
mkdir -p /tmp/apidoc
chown foreman:foreman /tmp/apidoc
foreman-rake apipie:static_swagger_json OUT=/tmp/apidoc

results in:

[root@sat]# ll /tmp/apidoc
total 27712
@starcraft66
starcraft66 / le-hpilo.sh
Last active July 8, 2024 06:42
Automatically deploy TLS certificates to HP iLO4 management controllers using the dehydrated ACME client.
#!/bin/bash
fqdn=ilo.example.com
username=Administrator
password=Password
#Check if the certificate is expiring soon
echo | openssl s_client -servername $fqdn -connect $fqdn:443 2>/dev/null | openssl x509 -noout -checkend 2592000
if [ "$?" == "1" ]; then
#Expiring in less than one month. We need to renew