openstack-ansible-os_nova/templates/lxd-init.sh.j2
Jesse Pretorius fdb2e962ec Fix lint failure E004
This patch fixes the following lint failure:
[E] E004: File did not end with a newline

in

templates/lxd-init.sh.j2 : L31

Change-Id: I0c7d361d8ef800c81c000a82a0f68c7922a5288b
2017-05-31 16:15:26 +00:00

33 lines
867 B
Django/Jinja

#!/bin/bash
# {{ ansible_managed }}
{% if (lxd_storage_backend == "zfs" or lxd_storage_backend == "dir") %}
# This is a script to configure lxd system settings.
# "/usr/bin/lxd init"
/usr/bin/lxd init \
--auto \
--network-address={{ lxd_bind_address }} \
--network-port={{ lxd_bind_port }} \
--storage-backend={{ lxd_storage_backend }} \
{% if lxd_storage_pool is defined %}
--storage-pool={{ lxd_storage_pool }} \
{% endif %}
{% if lxd_storage_create_device is defined %}
--storage-create-device={{ lxd_storage_create_device }} \
{% endif %}
--trust-password={{ lxd_trust_password }}
{% elif (lxd_storage_backend == "btrfs") %}
# Check if filesystem if mounted as btrfs.
# If not nothing happens and storage will still be set to dir by default
if [ $(findmnt /var/lib/lxd -o FSTYPE -n) == "btrfs" ]; then
systemctl restart lxd
fi
{% endif %}