How to customize CloudBolt emails

It is possible in CloudBolt to customize the contents of a particular email that CloudBolt sends out.  To do so, ssh to the CB server as root, copy the version of the template shipped with CB to a customer-specific directory (which will not be rewritten when CB is upgraded), and modify the file.

Here are the specific commands to run to override the email that CB sends when an order is complete:

mkdir /var/opt/cloudbolt/proserv/templates/email/
cp /opt/cloudbolt/templates/email/order_complete-body.template /var/opt/cloudbolt/proserv/templates/email/
vi /var/opt/cloudbolt/proserv/templates/email/order_complete-body.template

 

In the contents of the file, if you want to remove the rate for example, you would change this block:

{% for server in order.prov_server_list %}
* Hostname: {{ server.get_vm_name }}{% if server.ip %}
Primary IP: {{ server.ip }} {% endif %}{% if server.rate %}
Rate: {{ server.rate_display }}{% endif %}
{% endfor%}

To this:

{% for server in order.prov_server_list %}
* Hostname: {{ server.get_vm_name }}{% if server.ip %}
Primary IP: {{ server.ip }} {% endif %}
{% endfor%}
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.