net-shell 0.4.3

A script execution and variable extraction framework with SSH remote execution and local execution support, pipeline orchestration, and flexible variable extraction via regex.
Documentation
# 不要更改这个配置文件
global_scripts:
  - "{{ script_dir }}/global.sh"
variables:
  master_ip: "192.168.0.199"
  app_name: "myapp"
  version: "1.0.0"
  scene_names: |
    [
      {"name": "scene1", "title": "场景一"},
      {"name": "scene2", "title": "场景二"},
      {"name": "scene3", "title": "场景三"}
    ]
clients:
  mac_server:
    name: "mac_server"
    execution_method: ssh
    ssh_config:
      host: "{{ master_ip }}"
      port: 22
      username: "li"
      private_key_path: "/Users/li/.ssh/id_rsa"
      timeout_seconds: 1
pipelines:
#{% for item in scene_names jsonparse %}
  - name: "#{item.name}"
    title: "#{item.name}#{item.title}"
    steps:
      - name: "get_system_info"
        title: "获取系统信息"
        script: "{{ script_dir }}/get_system_info.sh"
        timeout_seconds: 3
        servers:
          - mac_server
        variables:
          foo: "bar"
        extract:
          - name: "os_version_num"
            patterns: ["(.+)"]
            source: "stdout"
#{% endfor %}