zoukankan      html  css  js  c++  java
  • 【Ansible】自动化运维工具Ansible的安装及使用

    常用自动化运维工具:###

    ①CFengine
    ②Chef
    ③Puppet
    ③SaltStack
    ③Ansible-基于python开发,分布式,无需客户端,轻量级。配置语言采用YAML.

    Ansible基本架构###

    Ansible工作原理###

    Ansible的安装及使用###

    ①CentOS Linux release 7.3.1611 (Core) 安装:

    yum install -y ansible
    
    [root@izuf6hcb8yumasfp52oemxz ansible]# ls /etc/ansible/
    ansible.cfg  hosts  roles
    

    ②Ansible与Inventory

    [root@izuf6hcb8yumasfp52oemxz ansible]# vi /etc/ansible/hosts 
    [test]
    114.116.213.202
    

    ③ Ansible简单操作

    [root@izuf6hcb8yumasfp52oemxz ansible]# ansible -i /etc/ansible/hosts test -u root -m command -a 'ls /home' -k
    SSH password: 
    /usr/lib/python2.7/site-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.22) or chardet (2.2.1) doesn't match a supported version!
      RequestsDependencyWarning)
    114.116.213.202 | CHANGED | rc=0 >>
    jenkins
    jenkins_home
    等价于====>
    [root@izuf6hcb8yumasfp52oemxz ansible]# ansible test -a 'ls /home' -k
    SSH password: 
    /usr/lib/python2.7/site-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.22) or chardet (2.2.1) doesn't match a supported version!
      RequestsDependencyWarning)
    114.116.213.202 | CHANGED | rc=0 >>
    jenkins
    jenkins_home
    
  • 相关阅读:
    LINX中的各种alloc
    Enea LINX代码分析之二(ECM_RX)
    Enea LINX代码分析之一
    看代码和写代码还是很不同的
    sctp bind
    sockaddr和sockaddr_in
    pthread条件变量
    System V IPV & Posix IPC(摘自Unix网络编程卷2)
    [宽度优先搜索] FZU-2150 Fire Game
    [字符哈希] POJ 3094 Quicksum
  • 原文地址:https://www.cnblogs.com/wucaiyun1/p/12330671.html
Copyright © 2011-2022 走看看