Fix puppet modules in mixed src/pkg environments

In mixed environments with puppet modules installed from source or from
packages, we end up in a situation where puppet can't find part of the
modules.

Symlink modules to their expected location for both source and package
installs.

Change-Id: I3e99feab5a2fff33cc4285197bdd5d00245d0999
This commit is contained in:
Martin André 2016-02-29 10:33:35 +09:00
parent 77a1f2a333
commit 9be05cd7a0
2 changed files with 10 additions and 0 deletions

View File

@ -2,4 +2,9 @@
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/

View File

@ -1,4 +1,9 @@
#!/bin/bash
set -eux
# Symlink modules to the expected location.
# Modules installed from source take precedence.
if (find /usr/share/openstack-puppet/modules/ -mindepth 1 2>/dev/null) | read; then
ln -f -s /usr/share/openstack-puppet/modules/* /etc/puppet/modules/
fi
ln -f -s /opt/stack/puppet-modules/* /etc/puppet/modules/