Hyperledger fabric 错误!错误!hosts_kafka.yml:5:预期键=值主机变量赋值,get:本地

Hyperledger fabric 错误!错误!hosts_kafka.yml:5:预期键=值主机变量赋值,get:本地,hyperledger-fabric,hyperledger,Hyperledger Fabric,Hyperledger,我正在使用最新的Altoros/Ansible Fabric Starter,当我运行Ansible playbook安装-python.yml-I hosts_kafka.yml时,它在终端中抛出一个错误,说:错误!错误!hosts_kafka.yml:5:Expected key=value主机变量赋值,get:local我正在本地系统上运行它。这是我的卡夫卡。yml all: hosts: localhost: # localhost connection parameters

我正在使用最新的Altoros/Ansible Fabric Starter,当我运行Ansible playbook安装-python.yml-I hosts_kafka.yml时,它在终端中抛出一个错误,说:错误!错误!hosts_kafka.yml:5:Expected key=value主机变量赋值,get:local我正在本地系统上运行它。这是我的卡夫卡。yml

all:
  hosts:
    localhost: # localhost connection parameters, used for storing configuration while transferring it between nodes
      ansible_connection: local
  vars:
    domain: example.com
    additional_channels: # optional, common channels are created by default. Just comment it out, if you don't need additional channels.
      - name: a-b # channel name
        particapants: # Organizations, should be included in channel
        - a
        - b
      - name: a-c
        particapants:
        - a
        - c
      - name: b-c
        particapants:
        - b
        - c
    orderer_type: kafka  # Enable kafka orderer, we'll have 4 brokers and 3 zookeepers.
    orderer_count: 3 # Amount of orderers in network, assumed that it equals to amount of organization, so each org will have an own orderer copy
    kafka_replicas: 2 # Set kafka_replicas parameter
    kafka_replication_factor: 3 # Set kafka_replication_factor parameter (https://hyperledger-fabric.readthedocs.io/en/release-1.2/kafka.html)
  children:
    nodes:
      hosts:
        kafka.example.com: # Describes which containers will run on this node
          node_roles:
            - zookeeper # Apache zookeeper instance
            - kafka_broker # Apache kafka instance
          org: kafka # Organization name
          zookeeper_id: 0 # ID for zookeeper
          kafka_broker_id: 0 # ID for kafka-broker
          ansible_host: 172.16.16.1 # Real ip address or domain name of the machine
          ansible_user: username  # User with sudo access
          ansible_private_key_file: ~/path-to-private-key # Private key to identify ourselves
          ansible_ssh_port: 22 # Specify ssh-port here, if case of it's not defaulted.
        # Same structure for any other nodes
        a.example.com:
          node_roles:
            - root_orderer # This node will be used to generate crypto-config for other orderers
            - orderer # This node will host an orderer-service
            - peer # This node will host peers and api containers for organization
            - root_peer # This node will be used to create channels and instantiate chaincode
            - zookeeper # Hosts zookeeper container for kafka-cluster
            - kafka_broker # Hosts broker container for kafka-cluster
            - explorer
          org: a
          orderer_id: 0 # ID of orderer-service which is running on this host
          zookeeper_id: 1
          kafka_broker_id: 1
          ansible_host: 172.16.16.2
          ansible_user: username
          ansible_private_key_file: ~/path-to-private-key
          ansible_ssh_port: 22
        b.example.com:
          node_roles:
            - orderer
            - peer
            - zookeeper
            - kafka_broker
          org: b
          orderer_id: 1
          zookeeper_id: 2
          kafka_broker_id: 2
          ansible_host: 172.16.16.3
          ansible_user: username
          ansible_private_key_file: ~/path-to-private-key
          ansible_ssh_port: 22
        c.example.com: # This node will host only kafka-broker and peer.
          node_roles:
            - peer
            - orderer
            - kafka_broker
          org: c
          orderer_id: 2
          kafka_broker_id: 3
          ansible_host: 172.16.16.4
          ansible_user: username
          ansible_private_key_file: ~/path-to-private-key
          ansible_ssh_port: 22

您好,我在这里找到了答案,经过研究,我发现可以通过重新安装ansible 2.5.0+来修复它,您就完成了