Ansible Tower 3.2.3 os_server module error

I am trying to build vm on IBM powervc which use actually openstack version 3.12.0 on **RHEL 7.4.**This (os_server ) module is throwing error “msg”: “shade is required for this module”. After googling, I tried different ways but have no luck yet.

I also tried ansible_python_interpreter: “/usr/bin/env python” as extra_var as well but did not work. It seems like shade is installed on ansible Tower machine but somehow it is unable to work with openstack server. Interesting part is if I use same playbook on command line in Tower machine it works perfectly. Not sure what exactly is changing when I use Tower GUI. Can anyone please help? My knowledge for openstack is minimum.

- 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

Just adding some more info in my previous post.

I am trying to build vm on IBM powervc which use actually openstack version 3.12.0 on **RHEL 7.4.**This (os_server ) module is throwing error “msg”: “shade is required for this module”. After googling, I tried different ways but have no luck yet.

I also tried ansible_python_interpreter: “/usr/bin/env python” as extra_var as well but did not work. It seems like shade is installed on ansible Tower machine but somehow it is unable to work with openstack server. Interesting part is if I use same playbook on command line in Tower machine it works perfectly. Not sure what exactly is changing when I use Tower GUI. Can anyone please help? My knowledge for openstack is minimum.

I tried delegate_to: openstackserver , using delegate I get “msg”: “shade is required for this module” and without delegate_to when I run as localhost the error appears as below: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)

smitconsultant2017@gmail.com (smitconsultant2017@gmail.com) said:

I am trying to build vm on IBM powervc which use actually *openstack
version 3.12.0* on *RHEL 7.4.*This (os_server ) module is throwing error
"msg": "shade is required for this module". After googling, I tried
different ways but have no luck yet.

I also tried ansible_python_interpreter: "*/usr/bin/env python*" as
extra_var as well but did not work. It seems like shade is installed on
ansible Tower machine but somehow it is unable to work with openstack
server. Interesting part is if I use same playbook on command line in Tower
machine it works perfectly. Not sure what exactly is changing when I use
Tower GUI. Can anyone please help? My knowledge for openstack is minimum.

This list is for AWX development specifically. If you are having issues
with Tower, please contact your Red Hat support rep.

Bill

RH won’t provide assistance as os_server is an community module. Thanks