tripleo-quickstart-extras/roles/baremetal-prep-overcloud/templates/adjust-interface-mtus.sh.j2
Gael Chamoulaud 5533b8f7a1 Adds a Bashate target to tox.ini.
This will now run bashate on all shell scripts. We could ignore the
following list of bashate errors:

- E006: Line longer than 79 columns (as many scripts use jinja
        templating, this is very difficult)
- E040: Syntax error determined using `bash -n` (as many scripts
        use jinja templating, this will often fail and the syntax
        error will be discovered in execution anyway)

Change-Id: I6f6d454ac54a0ac98d8b8a092fa522cba092a592
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2017-02-07 12:23:45 +01:00

26 lines
576 B
Django/Jinja

#!/bin/bash
set -eux
### --start_docs
## Adjust interface MTU valuesfor undercloud and overcloud
## =======================================================
## * Adjust interface mtus
## ::
{% for interface in (mtu_interface) %}
ip link set {{ interface }} mtu {{ mtu }}
echo "MTU={{ mtu }}" >> /etc/sysconfig/network-scripts/ifcfg-{{ interface }}
{% endfor %}
## * Modify dnsmasq-ironic.conf
## ::
echo -e "\ndhcp-option-force=26,{{ mtu }}" >> /etc/dnsmasq-ironic.conf
systemctl restart 'neutron-*'
systemctl restart openstack-ironic-conductor
### --stop_docs