FastHandle is fast operation tools for infrastructure configurations and tests.
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
appendix:fabric-vs-others.html [2017/12/24 23:56] kurihara |
appendix:fabric-vs-others.html [2020/02/20 23:46] (current) kurihara |
||
---|---|---|---|
Line 1: | Line 1: | ||
[[: | [[: | ||
- | ======FastHandle(Fabric) vs Other Tools====== | + | ======Python |
\\ | \\ | ||
Line 7: | Line 7: | ||
\\ | \\ | ||
- | ===== Fasthandle(Fabric) vs Only ssh ===== | + | ===== Python |
*FastHandle can easily deploy many servers. | *FastHandle can easily deploy many servers. | ||
Line 14: | Line 14: | ||
<sxh bash toolbar: | <sxh bash toolbar: | ||
- | $ fab -H x.x.x.x | + | $ fab -H x.x.x.x |
- | $ fab -H x.x.x.x auth.stg -- hostname | + | |
vs | vs | ||
+ | |||
$ ssh x.x.x.x hostname | $ ssh x.x.x.x hostname | ||
$ ssh -i ~/ | $ ssh -i ~/ | ||
Line 25: | Line 26: | ||
<sxh bash toolbar: | <sxh bash toolbar: | ||
- | $ fab -H x.x.x.x | + | $ fab -H x.x.x.x |
- | $ fab -H x.x.x.x auth.pro -- "echo 'any host 192.168.100.1 gw 192.168.0.5' | + | |
vs | vs | ||
+ | |||
$ ssh -t x.x.x.x sudo "bash -c 'echo \"any host 192.168.100.1 gw 192.168.0.5\" | $ ssh -t x.x.x.x sudo "bash -c 'echo \"any host 192.168.100.1 gw 192.168.0.5\" | ||
</ | </ | ||
<sxh bash toolbar: | <sxh bash toolbar: | ||
- | $ fab -H x.x.x.x | + | $ fab -H x.x.x.x |
vs | vs | ||
+ | |||
$ ssh x.x.x.x | $ ssh x.x.x.x | ||
</ | </ | ||
Line 39: | Line 43: | ||
<sxh bash toolbar: | <sxh bash toolbar: | ||
$ H=" | $ H=" | ||
- | $ fab -H $H | + | $ fab -H $H |
vs | vs | ||
Line 49: | Line 53: | ||
\\ | \\ | ||
===== Ansible Ad-Hoc Commands===== | ===== Ansible Ad-Hoc Commands===== | ||
- | |||
http:// | http:// | ||
+ | |||
+ | *Ansible must be aware of the initial connection " | ||
==== Ansible Options ==== | ==== Ansible Options ==== | ||
Line 89: | Line 94: | ||
==== Example ==== | ==== Example ==== | ||
+ | <sxh bash toolbar: | ||
+ | $ ansible -i 192.168.0.10, | ||
+ | $ ansible -i 192.168.0.10, | ||
+ | |||
+ | $ ansible -i 192.168.0.10, | ||
+ | $ ansible -i 192.168.0.10, | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | >The given command will be executed on all selected nodes. It will not be processed through the shell, so variables like $HOME and operations like “<”, “>”, “|”, “;” and “&” will not work (use the shell module if you need these features). | ||
+ | |||
+ | <sxh bash toolbar: | ||
+ | $ ansible -i 192.168.0.30, | ||
+ | $ ansible -i 192.168.0.30, | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | <sxh bash toolbar: | ||
+ | $ ansible -i 192.168.0.10, | ||
+ | SSH password: | ||
+ | 192.168.0.10 | SUCCESS | rc=0 >> | ||
+ | root | ||
+ | </ | ||
<sxh bash toolbar: | <sxh bash toolbar: | ||
Line 103: | Line 131: | ||
</ | </ | ||
+ | <sxh bash toolbar: | ||
+ | $ ansible -s -K -B 1 -a " | ||
+ | </ | ||
\\ | \\ |
My Sites
SNS
Copyright (c) 2025 FastHandle - IT Operations Examples All Rights Reserved.