-
Check Ansible Connection for all inventory host
ansible -i inventory/staging all -m ping
-
Run Shell Command:
ansible -i inventory/staging webservers -m "shell" -a "systemctl status nginx"
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
-- apt-get -y install lua-curl | |
-- /bin/ln -s /usr/include/x86_64-linux-gnu/curl /usr/include/ | |
-- /usr/bin/luarocks install lua-curl 0.3.13-1 | |
local function curlpost(url, payload, headers, timeout, filename) | |
local status, body | |
local curl = require("cURL") | |
local respfunc = function(r) body = r end | |
if filename then respfunc = io.open(filename, "w") end | |
local c = curl.easy{ |
wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make & cp src/redis-cli /usr/bin/
rdb --command protocol dump.rdb |redis-cli -h m -p -a --pipe
curl http://npmjs.org/install.sh | sh npm install redis-dump -g redis-dump -p 6379 -h localhost -d 0 > file.txt #backup cat file.txt | redis-cli #restore
- TCP DUMP:
tcpdump -nqt -s0 -A -i any port 5060 |grep "computer networking" -A 10 -B 10
- Ping with MTU size:
ping 122.152.145.101 -s 1500
- Find & Replace:
find ./hoiio/ -type f -exec sed -i "s/<origin_string>/<new_string>/g" {} +
- Repeat Command n times:
for i in {1..10}; do <command>; done