ANsible Opestack integration give 400 error.

36 views
Skip to first unread message

balubhai555

unread,
Mar 10, 2017, 8:38:42 AM3/10/17
to Ansible Project
Hello Team,
 

I am trying to do integration of Ansible with OpenStack. I got the below error. So please help me to solve this error.

error:

TASK [launch an instance] ******************************************************
fatal: [localhost]: FAILED! => {"changed": false, "extra_data": null, "failed": true, "msg": "Error fetching server list on envvars:RegionOne: (Inner Exception: Expecting to find domain in project - the server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-fba6a8d8-05f9-4c28-9b7b-1923b12fa60e))"}
    to retry, use: --limit @/root/balu/ans_playbooks/openstack/openstack.retry


The playbook is below.

# automatically assigns a floating IP
- name: launch a compute instance
  hosts: all
  sudo: yes
  tasks:
  - name: echo PATH into bashrc
    action: lineinfile dest=~/.bash_profile line='export user_domain_name=default' insertafter='EOF' regexp='export user_domain_name.*'  state=present
 
  - name: launch an instance
    os_server:
     state: present
     auth:
      auth_url: http://controller:5000/v3/
      username: ********
      password: *********
      project_name: Sample
     name: vm1
     region_name: RegionOne
     availability_zone: nova
     image: 34d91b63-ffa5-4601-b3cf-e04deaac8dec
     key_name: ubuntutestkeypair1
     timeout: 200
     flavor: m1.medium
     security_groups: default
     auto_ip: yes

Please help me. Thanks in advance.


Reply all
Reply to author
Forward
0 new messages