#!/bin/bash

set -eux

# Symlink modules to the expected location.
# Modules installed from package take precedence.
if (find /opt/stack/puppet-modules/ -mindepth 1 2>/dev/null) | read; then
  ln -f -s /opt/stack/puppet-modules/* /etc/puppet/modules/
fi
ln -f -s /usr/share/openstack-puppet/modules/* /etc/puppet/modules/
