tripleo-heat-templates/firstboot/conntectx3_streering.yaml
ramishra c9991c2e31 Use 'wallaby' heat_template_version
With I57047682cfa82ba6ca4affff54fab5216e9ba51c Heat has added
a new template version for wallaby. This would allow us to use
2-argument variant of the ``if`` function that would allow for
 e.g. conditional definition of resource properties and help
cleanup templates. If only two arguments are passed to ``if``
function, the entire enclosing item is removed when the condition
is false.

Change-Id: I25f981b60c6a66b39919adc38c02a051b6c51269
2021-03-31 17:35:12 +05:30

32 lines
980 B
YAML

heat_template_version: wallaby
description: >
This's a temporary workaround for adding this option
"log_num_mgm_entry_size=-1" to /etc/modprobe.d/mlx4.conf file in order to
allow steering in ConnectX-3 devices
resources:
userdata:
type: OS::Heat::MultipartMime
properties:
parts:
- config: {get_resource: allow_steering}
allow_steering:
type: OS::Heat::SoftwareConfig
properties:
config: |
#!/bin/bash
set -x
echo "options mlx4_core log_num_mgm_entry_size=-1" >> /etc/modprobe.d/mlx4.conf
/sbin/dracut --force
outputs:
# This means get_resource from the parent template will get the userdata, see:
# http://docs.openstack.org/developer/heat/template_guide/composition.html#making-your-template-resource-more-transparent
# Note this is new-for-kilo, an alternative is returning a value then using
# get_attr in the parent template instead.
OS::stack_id:
value: {get_resource: userdata}