FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


Sidebar


Top     SiteMap

Manager Server

Target Server

$FHHOME/bin/xxx.sh | xxxx.exp













.

preparation:fhhome:test.py.html



This is an old revision of the document!



Top#Preparation

fabfile/test.py

Operation

$ echo xx.xx.xx.xx | fab -- hostname
$ echo xx.xx.xx.xx | fab -- sudo cat /etc/shadow

$ fab local_hostname

$ fab -l |grep test.
$ echo xx.xx.xx.xx | fab auth.test test.hostname
$ fhghost.sh "*" hosts/test | fab auth.test test.hostname


fabfile/test.py

import sys
from fabric.api import *
from fabric.contrib import files

@task
def local_hostname():
    local('hostname')

@task
def hostname():
    run('hostname')

@task
def cat_etc_shadow():
    sudo('cat /etc/shadow')




Top#Preparation



preparation/fhhome/test.py.html.1512315326.txt.gz ยท Last modified: 2017/12/04 00:35 by kurihara