This file contains hidden or 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
# BASH Successerator. when running a process that has a high | |
# probability of failure use this function as a means to | |
# ensure the operation is run multiple times. | |
# Usage: | |
# successerator knife bootstrap -e ENV -r 'role[one],recipie[two]' | |
# Used to retry process that may fail due to random issues. | |
function successerator() { | |
MAX_RETRIES=${MAX_RETRIES:-5} |
This file contains hidden or 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
#!/usr/bin/env python | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains hidden or 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
#!/usr/bin/env bash | |
chef-server-ctl uninstall | |
dpkg -P chef-server | |
apt-get autoremove -y | |
apt-get purge -y | |
rm -rf /etc/chef-server /etc/chef /opt/chef-server /opt/chef /root/.chef /var/opt/chef-server/ /var/chef /var/log/chef-server/ | |
sed -i '/export PATH=\${PATH}:\/opt\/chef-server\/bin/d' /root/.bash_profile | |
pkill -9 -f /opt/chef | |
pkill -9 -f beam |