意外的異常錯誤“NonType”

意外的異常錯誤“NonType”

每當我嘗試運行時,ansible --version它都會顯示以下錯誤。

在此輸入影像描述

它就像是,但對此沒有解決方案。

答案1

  1. Ansible 是包裝完好在Ubuntu中:

封裝 ansible

trusty (14.04LTS) (admin): Configuration management, deployment, and task execution system [universe]
1.5.4+dfsg-1: all
trusty-backports (admin): Configuration management, deployment, and task execution system [universe]
1.7.2+dfsg-1~ubuntu14.04.1: all
xenial (16.04LTS) (admin): Configuration management, deployment, and task execution system [universe]
2.0.0.2-2: all
xenial-updates (admin): Configuration management, deployment, and task execution system [universe]
2.0.0.2-2ubuntu1: all
xenial-backports (admin): Configuration management, deployment, and task execution system [universe]
2.1.1.0-1~ubuntu16.04.1: all
artful (admin): Configuration management, deployment, and task execution system [universe]
2.3.1.0+dfsg-2: all
bionic (admin): Configuration management, deployment, and task execution system [universe]
2.3.1.0+dfsg-2: all
  1. 如果您確實需要安裝較新的版本,您應該運行

    sudo apt-get install python-pip
    sudo pip install ansible
    sudo pip install paramiko
    

    這導致

    $ ansible --version
    ansible 2.4.3.0
      config file = None
      configured module search path = [u'/home/xenial/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
      ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
      executable location = /usr/local/bin/ansible
      python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]
    

相關內容