Last active
August 29, 2015 14:20
-
-
Save callmeradical/3248b5865bc97b238f2a to your computer and use it in GitHub Desktop.
test_kitchen_user_data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# download crts | |
wget http://url-here/certs/ca-bundle.crt -O /etc/pki/tls/certs/ca-bundle.crt | |
wget http://url-here/certs/ca-bundle.trust.crt -O /etc/pki/tls/certs/ca-bundle.trust.crt | |
## for chef | |
mkdir -p /opt/chef/embedded/ssl/certs | |
mkdir -p /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/ssl_certs | |
ln -s /etc/pki/tls/certs/ca-bundle.crt /opt/chef/embedded/ssl/certs/ca-bundle.crt | |
ln -s /etc/pki/tls/certs/ca-bundle.trust.crt /opt/chef/embedded/ssl/certs/ca-bundle.trust.crt | |
ln -s /etc/pki/tls/certs/ca-bundle.crt /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/ssl_certs/cert.pem | |
ln -s /etc/pki/tls/certs/ca-bundle.crt /opt/chef/embedded/ssl/cert.pem | |
ENV_FILE=/etc/environment | |
cat << EOF > $ENV_FILE | |
CURL_CA_BUNDLE=/etc/pki/tls/certs/ca-bundle.crt | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd maybe change line's 12-15 to just this:
echo 'CURL_CA_BUNDLE=/etc/pki/tls/certs/ca-bundle.crt' > /etc/profile.d/ssl_crt.sh