9ed4aaf2b0
os-refresh-config simply runs things in a predictable order in directories that other elements can populate. This element installs it and sets it up to run at boot. We also modify os-config-applier element to be called by this rather than to have its own upstart job. This provides an example of how other elements can insert themselves into the refresh process. Change-Id: I52d72b7fd302ec317840af87fa77299387af99ad
18 lines
527 B
Bash
Executable file
18 lines
527 B
Bash
Executable file
#!/bin/bash
|
|
set -eux
|
|
|
|
TEMPLATES=git://github.com/tripleo/openstack-config-templates.git
|
|
|
|
sudo apt-get install --yes git python-pip
|
|
pip install -U git+https://github.com/tripleo/os-config-applier.git
|
|
|
|
mkdir -p /opt/stack
|
|
git clone $TEMPLATES /opt/stack/openstack-config-templates
|
|
|
|
runscript=$(os-refresh-config --print-base)/configuration.d/10-os-config-applier
|
|
mkdir -p $(dirname $runscript)
|
|
cat > $runscript <<- eof
|
|
#!/bin/sh
|
|
exec os-config-applier -t /opt/stack/openstack-config-templates/templates
|
|
eof
|
|
chmod 0755 $runscript
|