This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Configure Apache | |
template: > | |
src=httpd.conf.j2 | |
dest={{ httpd_conf_file }} | |
owner=root | |
group=root | |
mode=0644 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |