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 Last revision Both sides next revision | ||
os:linux:ope:index.html [2018/01/27 22:46] kurihara |
os:linux:ope:index.html [2018/03/14 00:33] kurihara |
||
---|---|---|---|
Line 1: | Line 1: | ||
[[: | [[: | ||
- | ====== | + | ====== |
$FHHOME/ | $FHHOME/ | ||
Line 14: | Line 14: | ||
</ | </ | ||
- | ==== Ref. Remote Shell Commands | + | \\ |
+ | ==== Fabric one-line Task Examples | ||
<sxh bash toolbar: | <sxh bash toolbar: | ||
$ echo xx.xx.xx.xx | fab auth.pro -- hostname | $ echo xx.xx.xx.xx | fab auth.pro -- hostname | ||
Line 26: | Line 27: | ||
<sxh python toolbar: | <sxh python toolbar: | ||
- | import sys | + | import sys, os |
from fabric.api import * | from fabric.api import * | ||
from fabric.contrib import files | from fabric.contrib import files | ||
from fabric.operations import open_shell | from fabric.operations import open_shell | ||
+ | from datetime import datetime | ||
FHHOME=os.environ[" | FHHOME=os.environ[" | ||
Line 39: | Line 41: | ||
@task | @task | ||
def put(local, | def put(local, | ||
- | """ | + | """ |
put(" | put(" | ||
Line 74: | Line 76: | ||
def sudo_vi(file): | def sudo_vi(file): | ||
""" | """ | ||
- | open_shell(" | + | open_shell(" |
Line 85: | Line 87: | ||
def cp_p_1dayago(file): | def cp_p_1dayago(file): | ||
""" | """ | ||
- | sudo(" | + | sudo(" |
My Sites
SNS
Copyright (c) 2024 FastHandle - IT Operations Examples All Rights Reserved.