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 | ||
|
preparation:fhhome:auth.py.html [2017/11/26 23:54] kurihara ↷ Page moved from preparation:scripts:auth.py.html to preparation:fhhome:auth.py.html |
preparation:fhhome:auth.py.html [2019/02/13 00:17] (current) kurihara |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| [[: | [[: | ||
| - | ====== fabfile/ | + | ====== |
| - | ===== fabfile/auth.py ===== | + | ===== Operation ===== |
| + | <sxh bash toolbar: | ||
| + | $ fab -l |grep -F auth. | ||
| + | auth.ciscopro | ||
| + | auth.junospro | ||
| + | auth.netapppro | ||
| + | auth.winpro | ||
| + | auth.winstg | ||
| + | ..... | ||
| + | </ | ||
| \\ | \\ | ||
| - | < | + | ===== $FHHOME/ |
| + | |||
| + | \\ | ||
| + | < | ||
| \\ | \\ | ||
| Line 15: | Line 28: | ||
| from fabric.contrib import files | from fabric.contrib import files | ||
| + | adding os.environ[" | ||
| + | |||
| + | |||
| + | # | ||
| + | # Windows | ||
| + | # | ||
| @task | @task | ||
| - | def pro(): | + | def winpro(): |
| - | ''' | + | ''' |
| - | env.user = 'USER01' | + | env.user = 'fasthandle' |
| - | env.key_filename = '~/.ssh/id_rsa_production' | + | env.key_filename = '$FHHOME/key/id_rsa.fasthandle.pro-fasthandle-1' |
| - | env.password = ' | + | |
| - | + | ||
| @task | @task | ||
| - | def stg(): | + | def winstg(): |
| - | ''' | + | ''' |
| - | env.user = 'USER01' | + | env.user = 'fasthandle' |
| - | env.key_filename | + | env.password |
| - | | + | |
| - | + | # | |
| + | # Hardware | ||
| + | # | ||
| @task | @task | ||
| - | def dev(): | + | def ciscopro(): |
| - | ''' | + | ''' |
| - | env.user = 'USER02' | + | env.user = 'fasthandle' |
| - | env.key_filename = ' | + | env.password = 'fastpass' |
| - | env.password = 'passphrase-for-key' | + | |
| - | + | ||
| @task | @task | ||
| - | def tmp(): | + | def junospro(): |
| + | ''' | ||
| env.user = ' | env.user = ' | ||
| env.password = ' | env.password = ' | ||
| @task | @task | ||
| - | def tmp2(): | + | def netapppro(): |
| - | env.user = 'USER01' | + | ''' |
| - | env.password = 'PASSWORD' | + | env.user = 'root' |
| + | env.password = 'fastpass' | ||
| </ | </ | ||
| Line 50: | Line 72: | ||
| <WRAP box 90%> | <WRAP box 90%> | ||
| [[: | [[: | ||
| - | <catlist ..: -noAddPageButton -noHead | + | <catlist ..: -noAddPageButton -noHead> |
| </ | </ | ||
| \\ | \\ | ||
| [[: | [[: | ||
My Sites
SNS
Copyright (c) 2025 FastHandle - IT Operations Examples All Rights Reserved.