zoukankan      html  css  js  c++  java
  • ARTS-S ansible-playbook

    文件a.yml

    ---
    - hosts: cluster
      remote_user: ksotest
      gather_facts: false
      tasks:
        - name: delete dir if exists
          file:
            state: absent
            path: /home/ksotest/apps/te
        - name: create dir
          file:
            path: /home/ksotest/apps/te
            state: directory
        - name: copy extract_api
          copy:
            src: /home/ksotest/extract_api
            dest: /home/ksotest/apps/te/extract_api
            owner: ksotest
            group: ksotest
            mode: u=rwx,g=rx,o=rx
        - name: copy create config shell
          copy:
            src: /home/ksotest/create_config.sh
            dest: /home/ksotest/apps/te/create_config.sh
            owner: ksotest
            group: ksotest
            mode: u=rwx,g=rx,o=rx
        - name: create config
          shell: /home/ksotest/apps/te/create_config.sh /home/ksotest/apps/te/conf
        - name: copy run_te.sh
          copy:
            src: /home/ksotest/run_te.sh
            dest: /home/ksotest/apps/te/run_te.sh
            owner: ksotest
            group: ksotest
            mode: u=rwx,g=rx,o=rx
    

    执行anible-playbook

    ansible-playbook -i ansible_hosts.cfg a.yml
    

    其中ansible_hosts.cfg的内容为

    [cluster]
    10.0.0.1
    10.0.0.2
    10.0.0.3
    10.0.0.4
    
  • 相关阅读:
    npx
    EOS踩坑记 2
    Communication Model
    EOS踩坑记
    Windows导入EOS工程
    搭建EOS环境
    加入EOS主网
    Add Inline Actions
    Secondary Indices
    Data Persistence
  • 原文地址:https://www.cnblogs.com/zhouyang209117/p/10217039.html
Copyright © 2011-2022 走看看