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
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |
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
echo "DPkg::Post-Invoke {\"/bin/rm -f /var/cache/apt/archives/*.deb || true\";};" > /etc/apt/apt.conf.d/clean |
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
# install erang first | |
# i use https://gist.github.com/vladbabii/704e14dadf6aef671ecb38bf6902a7cc | |
# then download the deb file from https://www.rabbitmq.com/install-debian.html | |
apt-get install socat logrotate init-system-helpers | |
# replace * with the version is you have downloaded multiple files | |
dpkg -i rabbitmq-server_*.deb |
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
# replace thenewusername thenewpassword ;) | |
rabbitmqctl add_user thenewusername thenewpassword | |
rabbitmqctl set_user_tags thenewusername administrator | |
rabbitmqctl set_permissions -p / thenewusername ".*" ".*" ".*" |
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
wget https://downloads.sourceforge.net/project/repcached/repcached/2.2.1-1.2.8/memcached-1.2.8-repcached-2.2.1.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Frepcached%2Ffiles%2F&ts=1484404423&use_mirror=netix | |
mv memcached-1.2.8-repcached-2.2.1.tar.gz\?r\=https%3A%2F%2Fsourceforge.net%2Fprojects%2Frepcached%2Ffiles%2F memcached-1.2.8-repcached-2.2.1.tar.gz | |
tar xvf memcached-1.2.8-repcached-2.2.1.tar.gz | |
apt-get install libevent-dev g++ makelibevent1-dev | |
cd memcached-1.2.8-repcached-2.2.1 | |
./configure --enable-replication | |
make | |
make install | |
ln -s /usr/local/bin/memcached /usr/bin/repcached |
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
vrrp_script chk_apache2 { | |
script "/usr/bin/killall -0 apache2" | |
interval 2 | |
fall 2 | |
rise 2 | |
weight 30 | |
} | |
vrrp_script chk_repcached { | |
script "/usr/bin/killall -0 repcached" |
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
vrrp_script chk_apache2 { | |
script "/usr/bin/killall -0 apache2" | |
interval 2 | |
fall 2 | |
rise 2 | |
} | |
vrrp_script chk_repcached { | |
script "/usr/bin/killall -0 repcached" | |
interval 2 |
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
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer | |
ln -s /usr/local/bin/composer /usr/bin/composer |
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
check process repcached | |
matching "repcached -d -m" | |
start program = "/usr/bin/repcached -d -m 256 -p 11211 -u root -P /var/run/memcachedrep.pid -l$ | |
stop program = "/bin/kill -9 $(pidof repcached)" | |
if failed host 172.16.62.104 port 11211 type tcp then restart |
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
sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep x11 | sed s/install//` | |
sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep python | sed s/install//` | |
sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep sound | sed s/install//` | |
sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep gnome | sed s/install//` | |
sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep lxde | sed s/install//` | |
sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep gtk | sed s/install//` | |
sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep desktop | sed s/install//` | |
sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep gstreamer | sed s/install//` | |
sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep avahi | sed s/install//` | |
sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | gr |
OlderNewer