39 lines
859 B
YAML
39 lines
859 B
YAML
#cloud-config
|
|
merge_how: dict(recurse_array)+list(append)
|
|
write_files:
|
|
- path: /etc/systemd/system/add-ext-ca-certs.service
|
|
owner: "root:root"
|
|
permissions: "0644"
|
|
content: |
|
|
[Unit]
|
|
Description=Install custom CA certificates
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=/etc/sysconfig/add-ext-ca-certs.sh
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
|
|
- path: /etc/ssl/certs/openstack-ca.pem
|
|
owner: "root:root"
|
|
permissions: "0644"
|
|
encoding: b64
|
|
content: |
|
|
$OPENSTACK_CA
|
|
|
|
- path: /etc/sysconfig/add-ext-ca-certs.sh
|
|
owner: "root:root"
|
|
permissions: "0755"
|
|
content: |
|
|
#!/bin/sh
|
|
|
|
CERT_FILE=/etc/ssl/certs/openstack-ca.pem
|
|
if [ -f "$CERT_FILE" ]
|
|
then
|
|
|
|
chmod 0644 ${CERT_FILE}
|
|
chown root:root ${CERT_FILE}
|
|
update-ca-certificates
|
|
fi
|