Skip to content

Instantly share code, notes, and snippets.

- name: Configure Apache
template: >
src=httpd.conf.j2
dest={{ httpd_conf_file }}
owner=root
group=root
mode=0644
@br0ziliy
br0ziliy / gist:4f44a1fa59aabf945cb4
Created May 19, 2015 20:00
Reset CPanel SSL certificates from command line (CLI) using API
# Create root account access hash, if it's not there
[ -f /root/.accesshash ] || /usr/local/cpanel/bin/mkaccesshash
# List CPanel services that have SSL installed
curl -s -k -H "Authorization: WHM root:"`cat /root/.accesshash | sed ':a;N;$!ba;s/\n//g'` 'https://localhost:2087/json-api/fetch_service_ssl_components?api.version=1' | python -mjson.tool | grep service
# Reset SSL certificate for a service (courier-imapd in this example
curl -s -k -H "Authorization: WHM root:"`cat /root/.accesshash | sed ':a;N;$!ba;s/\n//g'` 'https://localhost:2087/json-api/reset_service_ssl_certificate?api.version=1&service=courier-imapd' | python -mjson.tool