首页 文章

Ansible Tower os_server模块错误

提问于
浏览
1

我正在尝试在IBM powervc上构建vm,它实际上使用 openstack version 3.12.0 RHEL 7.4. 这个(os_server)模块正在抛出错误"msg":"shade is required for this module" . 谷歌搜索后,我尝试了不同的方式,但没有运气 .

我也尝试了ansible_python_interpreter:“ /usr/bin/env python ”作为extra_var但是没有用 . 似乎在ansible塔式机器上安装了遮阳但不知何故它无法与openstack服务器一起使用 . 有趣的是,如果我在塔机的命令行上使用相同的剧本,它就能完美运行 . 当我使用Tower GUI时,不确定究竟发生了什么变化 . 有人可以帮忙吗?我对openstack的了解最少 .

我尝试了delegate_to:openstackserver,使用委托我得到 "msg": "shade is required for this module" 并且当我作为localhost运行时没有delegate_to,错误如下所示: ConnectFailure(msg)\nkeystoneauth1.exceptions.connection.ConnectFailure: Unable to establish connection to https://localhost:9292/v2/images: HTTPSConnectionPool(host='localhost', port=9292): Max retries exceeded with url: /v2/images (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused'

- host: localhost
  tasks:
  - name: Provision a New VM
    os_server:
     state: present
     auth:
      auth_url: https://openstackserver:5000/v3
      username: "{{ username }}"
      password: "{{ password }}"
      os-user-domain-name: Default
      os-user-domain-id: default
      os-project-domain-name: Default
      project_id: 1225tgfd54a54b28b332605
      project_name: default
     region_name: RegionOne
     image: 69853124-a87a-48bf-a15a-5863
     flavor: "{{ Flavour }}"
     name: "{{ Hostname }}"
     auto_ip: no
     nics:
       - port-name: "{{ Hostname }}-port"
     meta:
         hostname: "{{ Hostname }}"
     config_drive: true
     userdata: "{{ user_data.stdout }}"
     validate_certs: no
    register: new_vm
    ignore_errors: false
    delegate_to: "openstackserver"  (used for testing)

Ansible Tower版本:3.2.3 Ansible 2.4.3.0 Tower python venv:/var/lib/awx/venv/awx/lib/python2.7/ Towr python路径:/ usr / bin / python Python ver:Python 2.7.5

1 回答

  • 0

    你能否分享一下你环境的 pip list 的输出?

    从GUI启动您是否选择了正确的库存/凭证?

相关问题