-
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"
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