zoukankan      html  css  js  c++  java
  • ansibel playbook 实例1

    node2:/root/sbin#cat /etc/ansible/hosts
    [webservers]
    192.168.137.2
    192.168.137.3
    115.236.19.4:9998
    1.1.1.1
    node2:/root/sbin#cat test_connect.
    cat: test_connect.: No such file or directory
    node2:/root/sbin#cat test_connect.yml 
    ---
    - hosts: webservers
      remote_user: root
      tasks:
        - name: test connection
          ping:
          remote_user: root
    node2:/root/sbin#ansible-playbook -i /etc/ansible/hosts test_connect.yml 
    
    PLAY [webservers] *******************************************************************************************************
    
    TASK [Gathering Facts] **************************************************************************************************
    ok: [192.168.137.2]
    ok: [192.168.137.3]
    fatal: [1.1.1.1]: UNREACHABLE! => {"changed": false, "msg": "timed out", "unreachable": true}
    fatal: [115.236.19.4]: UNREACHABLE! => {"changed": false, "msg": "timed out", "unreachable": true}
    
    TASK [test connection] **************************************************************************************************
    ok: [192.168.137.3]
    ok: [192.168.137.2]
    	to retry, use: --limit @/root/sbin/test_connect.retry
    
    PLAY RECAP **************************************************************************************************************
    1.1.1.1                    : ok=0    changed=0    unreachable=1    failed=0   
    115.236.19.4               : ok=0    changed=0    unreachable=1    failed=0   
    192.168.137.2              : ok=2    changed=0    unreachable=0    failed=0   
    192.168.137.3     
  • 相关阅读:
    今天终于把IBM的rose2007破解版 弄好了
    Oracle_Statspack性能诊断工具
    ORACLE配置STATSPACK步骤
    为什么需要Analyze表
    四种数据ETL模式
    ETL数据抽取策略
    excel中宏与VBA的关系
    RMAN基础知识(二)
    常见Web技术之间的关系,你了解多少?
    RMAN 还原与恢复
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349110.html
Copyright © 2011-2022 走看看