Launching instance with Ansible

asked 2017-05-02 07:10:26 -0500

hultanu gravatar image

updated 2017-05-02 08:07:17 -0500

Hi ! I have the following playbook:

 - name: Provisioning a VM with OpenStack
 hosts: controller
    - name: Launch an instance
        state: present
          auth_url: https://some-ip:5000/v3
          username: admin
          password: *********
          project_id: 21b28a63816a40c083c0ef1a03ff2af7
          project_name: admin
          user_domain_name: "Default" 
        name: aa_ansible_testvm
        network: public
        region_name: RegionOne
        timeout: 300
        key_name: test
        image: cirros
        flavor: tempest1

The output i`m getting from running ansible-playbook test1.yml -vvv is this

  "fatal: []: FAILED! => {  
    "changed": false,   
    "extra_data": null,   
    "failed": true,   
    "invocation": {  
        "module_args": {  
            "api_timeout": null,   
            "auth": null,   
            "auth_type": null,   
            "auto_floating_ip": false,   
            "auto_ip": false,   
            "availability_zone": "nova",   
            "boot_from_volume": false,   
            "boot_volume": null,   
            "cacert": null,   
            "cert": null,   
            "cloud": null,   
            "config_drive": false,   
            "delete_fip": false,   
            "endpoint_type": "public",   
            "flavor": "tempest1",   
            "flavor_include": null,   
            "flavor_ram": null,   
            "floating_ip_pools": null,   
            "floating_ips": null,   
            "image": "cirros",   
            "image_exclude": "(deprecated)",   
            "key": null,   
            "key_name": "test",   
            "meta": null,   
            "name": "Fuckoff3",   
            "network": null,   
            "nics": [],   
            "region_name": "RegionOne",   
            "reuse_ips": true,   
            "scheduler_hints": null,   
            "security_groups": [  
            "state": "present",   
            "terminate_volume": false,   
            "timeout": 180,   
            "userdata": null,   
            "validate_certs": false,   
            "verify": false,   
            "volume_size": false,   
            "volumes": [],   
            "wait": true  
   `` "msg": "Error fetching server list on :RegionOne: (Inner Exception: Problem with auth parameters)"  ``

I'm crying, it has been more than 2 days since i m not able to go beyond this. On local host everything works fine, but from remote it does NOT want to do it. With or without sourcing the Openrc file, it still doesn't want to go. I tried everything and nothing works!!
Any Ideas? Please help !!

edit retag flag offensive close merge delete



please try to use the os_auth token first for debug reasons. This way you can ensure it's not a problem with your credentials. Please also try to create the instance with the python-openstackclient.

I suspect that a part of your API is not reachable from the remote host.

Micha gravatar imageMicha ( 2017-05-03 06:21:52 -0500 )edit