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 | ||
|
middleware:tftp:index.html [2018/02/01 01:12] kurihara |
middleware:tftp:index.html [2019/02/11 00:47] (current) kurihara |
||
|---|---|---|---|
| Line 7: | Line 7: | ||
| \\ | \\ | ||
| - | ===== Squid Operation ===== | + | ===== TFTP Operation ===== |
| <sxh bash toolbar: | <sxh bash toolbar: | ||
| $ fab -l |grep tftp | $ fab -l |grep tftp | ||
| Line 13: | Line 13: | ||
| <sxh bash toolbar: | <sxh bash toolbar: | ||
| - | $ fab -H x.x.x.x | + | $ fab -H x.x.x.x |
| </ | </ | ||
| - | + | \\ | |
| - | ==== Ref. Remote Shell Commands | + | ==== Fabric Temporary Run Call Examples |
| <sxh bash toolbar: | <sxh bash toolbar: | ||
| $ H=test-serve-01, | $ H=test-serve-01, | ||
| - | $ fab -H $H auth.pro | + | $ fab -H $H -- sudo diff / |
| - | $ fab -H $H auth.pro | + | $ fab -H $H -- sudo mv / |
| - | $ fab -H $H auth.pro | + | $ fab -H $H -- "ps aux |grep suqid" |
| - | $ fab -H $H auth.pro | + | $ fab -H $H -- sudo systemctl status squid |
| - | $ fab -H $H auth.pro | + | $ fab -H $H -- sudo systemctl restart squid |
| </ | </ | ||
| \\ | \\ | ||
| - | ===== squid.py ===== | + | ===== tftp.py ===== |
| $FHHOME/ | $FHHOME/ | ||
| Line 37: | Line 37: | ||
| import sys, os | import sys, os | ||
| from fabric.api import * | from fabric.api import * | ||
| - | from fabric.contrib import files, sed | + | from fabric.contrib import files |
| FHHOME=os.environ[" | FHHOME=os.environ[" | ||
| Line 46: | Line 46: | ||
| # squid.install_tftp | # squid.install_tftp | ||
| @task | @task | ||
| - | def install_tftp(): | + | def install_rpm(): |
| ''' | ''' | ||
| sudo(" | sudo(" | ||
| Line 59: | Line 59: | ||
| def conf(): | def conf(): | ||
| sudo(" | sudo(" | ||
| - | | + | |
| # | # | ||
| sudo(" | sudo(" | ||
| #sed -i " | #sed -i " | ||
| - | | + | |
| # | # | ||
| - | sudo(sed -i " | + | sudo('sed -i " |
| #sed -i " | #sed -i " | ||
| + | sudo(" | ||
| + | sudo(" | ||
| # | # | ||
| # Service | # Service | ||
| # | # | ||
| - | |||
| - | |||
| </ | </ | ||
| - | \\ | ||
| - | ===== Configuration ===== | ||
| - | *[[middleware: | ||
| - | *[[middleware: | ||
My Sites
SNS
Copyright (c) 2025 FastHandle - IT Operations Examples All Rights Reserved.