У меня есть образец книги Netapp
---
- hosts: all
gather_facts: False
become: yes
become_user: root
become_method: sudo
tasks:
- name: Start restore
na_elementsw_snapshot_restore:
hostname: "{{ip_adr}}"
username: "{{username}}"
password: ""
account_id: ansible-1
src_snapshot_id: snapshot_20171021
src_volume_id: volume-playarea
dest_volume_name: dest-volume-area
и этот файл инвентаря
snaptest ansible_host=192.168.1.10 ansible_connection=ssh ansible_user=centos ansible_ssh_private_key_file=/home/slenz/.ssh/id_vm_sync ansible_python_interpreter=/usr/bin/python2.7
[snap]
snaptest
когда я запускаю playbook, я получаю
fatal: [snaptest]: FAILED! => {"changed": false, "msg": "the python SolidFire SDK module is required"}
Однако я установил Solidfire через pip
Requirement already satisfied: solidfire-sdk-python in /usr/lib/python2.7/site-packages (1.5.0.87)
Requirement already satisfied: setuptools>=19.2 in /usr/lib/python2.7/site-packages (from solidfire-sdk-python) (41.0.1)
Requirement already satisfied: future>=0.15.2 in /usr/lib/python2.7/site-packages (from solidfire-sdk-python) (0.17.1)
Requirement already satisfied: enum34>=1.1.6 in /usr/lib/python2.7/site-packages (from solidfire-sdk-python) (1.1.6)
Requirement already satisfied: requests>=2.9.1 in /usr/lib/python2.7/site-packages (from solidfire-sdk-python) (2.22.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests>=2.9.1->solidfire-sdk-python) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python2.7/site-packages (from requests>=2.9.1->solidfire-sdk-python) (2.8)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/lib/python2.7/site-packages (from requests>=2.9.1->solidfire-sdk-python) (1.25.3)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests>=2.9.1->solidfire-sdk-python) (2019.3.9)
Теперь мой вопрос: почему ансибл не находит сплошной огонь? Я могу открыть python cli и выполнить «import solidfire.common», и это работает.
Я использую ansible 2.8.0, centos7 и python 2.7.5
Спасибо за любую помощь.