#cloud-config
merge_how: dict(recurse_array)+list(append)
write_files:
  - path: /etc/systemd/system/$SERVICE-failure.service
    owner: "root:root"
    permissions: "0644"
    content: |
      [Unit]
      Description=$SERVICE Failure Notifier

      [Service]
      Type=simple
      TimeoutStartSec=0
      ExecStart=/usr/bin/$WAIT_CURL $VERIFY_CA \
        --data-binary '{"status": "FAILURE", "reason": "$SERVICE service failed to start.", "data": "Failure"}'
