forked from vmware-archive/concourse-pipeline-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask.sh
More file actions
executable file
·23 lines (18 loc) · 673 Bytes
/
task.sh
File metadata and controls
executable file
·23 lines (18 loc) · 673 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
set -eu
# This task will invoke the regenerate non-certificates API endpoint from Ops Manager
# PCF Documentation: https://docs.pivotal.io/pivotalcf/security/pcf-infrastructure/api-cert-rotation.html
main() {
echo "Rotating non-configurable certificates for ${OPSMAN_DOMAIN_OR_IP_ADDRESS}..."
om-linux \
--target "https://${OPSMAN_DOMAIN_OR_IP_ADDRESS}" \
--skip-ssl-validation \
--client-id "${OPSMAN_CLIENT_ID}" \
--client-secret "${OPSMAN_CLIENT_SECRET}" \
--username "${OPSMAN_USERNAME}" \
--password "${OPSMAN_PASSWORD}" \
curl \
--path /api/v0/certificate_authorities/active/regenerate \
--request POST
}
main