Script to automatically update certificate and update an F5 client ssl profile.
Pre Reqs Python 2.7 pip f5 python sdk certbot
- Create new cert.
create new cert using certbot certonly --webroot -w /var/www/html/cert -d example.com -d test.example.com
- Edit Python script.
Change the following lines to reflect your domain(s).
domain = 'test.example.com'
key = '/etc/letsencrypt/live/example.com/privkey.pem'
cert = '/etc/letsencrypt/live/example.com/cert.pem'
chain = '/etc/letsencrypt/live/example.com/chain.pem'
-
Edit the config/creds.json file to reflect you F5 Managment port and credentials.
-
Cron Add
certbot renew
to cron. (once a month should work) Add the python script to cron running after the renew.
The bulk of the script came from Jason Rahm of F5 Networks.