zoukankan      html  css  js  c++  java
  • Fabric密码保存

    参考:https://segmentfault.com/a/1190000000497630

    多个IP分别使用不同的账号、密码

    from fabric.api import *
    env.hosts = [
        'user@192.168.1.1',
        'user@192.168.1.2',
    ]
    
    env.passwords = {
        'user@192.168.1.1:22': 'password1',
        'user@192.168.1.2:22': 'password2',
    }
    
    @task
    def hello():
        run('echo "hello,world"')

    多个IP使用相同的密码:

    env.user = 'username'
    env.password = 'pass'
    env.hosts = ['192.168.1.1', '192.168.1.2', '192.168.1.3']
    env.hosts=['root@192.168.1.1','root@192.168.1.2']
    env.password='password'
  • 相关阅读:
    10多媒体
    胡凡-01
    概念
    算法
    07Axios
    05VueCli
    04Vue.js路由系统
    03生命周期
    《穷人思维》学习感悟
    《基金》学习感悟之二
  • 原文地址:https://www.cnblogs.com/dreamer-fish/p/5784846.html
Copyright © 2011-2022 走看看