zoukankan      html  css  js  c++  java
  • 2

    1. Ansible Inventory
      Before we dive into Ansible and practice, there is one more thing we need to do is take care with the ansible inventory, to declare our shell-node1 to be our managed machine, how ?
      There is a configure file, to declare our node1 to be ansible managed machine, the file on master node is named /etc/ansible/hosts

      Edit the file, include shell-node1 to the inventory as below:
      Run command vi /ect/ansible/hosts, then update below section. From the file it's provided examples, now we go with inventory group policy.
      Uncomment the section [webservers], then put with our shell-node1 host name (you can also using IP address) under that group.

       Save the file and exit. Now we can go play with ansible !

    2. Ansible modules
      Run below commands you will find all the modules which Ansible supported:
      ansible-doc -l | sort

       There are too much modules, from here we are going to pick a few common used to demonstrate only.

    3. Ansible module help
      By running command ansible-doc -s [module name] you can find the module help documentation, for example, we can determine how to use module [command] as below:
    4. Good, now we have Ansible all ready, and we know how to find help documentation for Ansible modules, next let's get our hand dirty, put practice on some common used modules.
  • 相关阅读:
    linux 开机启动设置
    Ubuntu安装Oracle时出现乱码,及其他安装错误
    ubuntu 设置DNS
    opencv cuda TK1 TX1 兼容设置
    int to string
    post文件的html
    vc 获得调用者的模块名称
    dlib landmark+人面识别
    android破解
    jquery $(document).ready() 与window.onload的区别
  • 原文地址:https://www.cnblogs.com/waynewei/p/15111489.html
Copyright © 2011-2022 走看看