FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


appendix:fabric-vs-others.html



Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
appendix:fabric-vs-others.html [2020/02/20 23:39]
kurihara
appendix:fabric-vs-others.html [2020/02/20 23:46] (current)
kurihara
Line 101: Line 101:
 $ ansible -i 192.168.0.10,192.168.0.11, all -s  -a "hostname" $ ansible -i 192.168.0.10,192.168.0.11, all -s  -a "hostname"
 </sxh> </sxh>
 +
 +\\
 +>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:false gutter:false>
 +$ ansible -i 192.168.0.30, all  -m shell -a  "hostname > /tmp/test.txt"
 +$ ansible -i 192.168.0.30, all  -m shell -a  "cat /etc/ssh/sshd_config |grep -i Root"
 +</sxh>
 +
 +\\
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
 $ ansible -i 192.168.0.10, all   -u root -k -a "hostname" $ ansible -i 192.168.0.10, all   -u root -k -a "hostname"


appendix/fabric-vs-others.html.1582209553.txt.gz · Last modified: 2020/02/20 23:39 by kurihara