FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


preparation:fhhome:auth.py.html



Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
preparation:fhhome:auth.py.html [2018/02/05 01:33]
kurihara
preparation:fhhome:auth.py.html [2019/02/13 00:17] (current)
kurihara
Line 1: Line 1:
 [[:index.html#OS Management|Top#OS Management]] [[:index.html#OS Management|Top#OS Management]]
-====== $FHHOME/fabfile/auth.py ======+====== $FHHOME/windows/fabfile/auth.py ======
  
  
Line 8: Line 8:
 $ fab -l |grep -F auth. $ fab -l |grep -F auth.
     auth.ciscopro                           USER=fasthandle PASSWORD=fas***s     auth.ciscopro                           USER=fasthandle PASSWORD=fas***s
-    auth.dev                                Develop # USER=fasthandle 
     auth.junospro                           USER=fasthandle PASSWORD=fas***s     auth.junospro                           USER=fasthandle PASSWORD=fas***s
     auth.netapppro                          USER=root PASSWORD=fas***s     auth.netapppro                          USER=root PASSWORD=fas***s
-    auth.pro                                Production # USER=fasthandle KEY 
-    auth.stg                                Staging # USER=fasthandle KEY 
-    auth.test1                              USER=fasthandle PASSWORD=fas***s 
-    auth.test2                              USER=user01 PASSWORD=us***01 
     auth.winpro                             USER=fasthandle KEY     auth.winpro                             USER=fasthandle KEY
     auth.winstg                             USER=fasthandle PASSWORD=fas***s     auth.winstg                             USER=fasthandle PASSWORD=fas***s
-    ope.cp_p_1dayago                        fab auth.pro  cp_p_1dayago:/etc/h... +    .....
-    ope.put                                 fab auth.pro ope.scp:/home/fastha... +
-    ope.ssh                                 fab auth.pro ope.ssh +
-    ope.sshcmd                              fab auth.pro ope.sshcmd:"sudo vi ... +
-    ope.sudo_vi                             fab auth.pro ope.vi:/etc/hosts+
 </sxh> </sxh>
  
Line 37: Line 28:
 from fabric.contrib import files from fabric.contrib import files
  
 +adding os.environ["FHHOME"]
  
-#------------------------------------------------------------------------ 
-# Linux 
-#------------------------------------------------------------------------ 
-@task 
-def pro(): 
-    '''Production # USER=fasthandle KEY''' 
-    env.user = 'fasthandle' 
-    env.key_filename = '$FHHOME/key/id_rsa.fasthandle.pro-fasthandle-1' 
-    #env.password = 'passphrase-for-key' 
- 
-@task 
-def stg(): 
-    '''Staging # USER=fasthandle KEY''' 
-    env.user = 'fasthandle' 
-    env.key_filename = '$FHHOME/key/id_rsa.fasthandle.stg-fasthandle-1' 
-    #env.password = 'passphrase-for-key' 
- 
-@task 
-def dev(): 
-    '''Develop # USER=fasthandle''' 
-    env.user = 'fasthandle' 
-    env.key_filename = '$FHHOME/key/id_rsa.fasthandle.dev-fasthandle-1' 
-    #env.password = 'passphrase-for-key' 
- 
-@task 
-def test1(): 
-    '''USER=fasthandle PASSWORD=fas***s''' 
-    env.user = 'fasthandle' 
-    env.password = 'fastpass' 
- 
-@task 
-def test2(): 
-    '''USER=user01 PASSWORD=us***01''' 
-    env.user = 'user01' 
-    env.password = 'user01' 
  
 #------------------------------------------------------------------------ #------------------------------------------------------------------------


preparation/fhhome/auth.py.html.1517762009.txt.gz · Last modified: 2018/02/05 01:33 by kurihara