Ansible Fatal Error: "authorization on proxmox cluster failed with exception: URL has an invalid label."

Nelson32

Member
Aug 4, 2020
2
0
6
Hello Proxmox Community,

i am currently trying to configure Ansible on one of my proxmox hosts to make kvm-deployment a little easier.
I installed Ansible via apt and "proxmoxer" and "requests" via pip.

When i try to execute my playbook i get the following error: fatal: [proxmox3]: FAILED! => {"changed": false, "msg": "authorization on proxmox cluster failed with exception: URL has an invalid label."}

My inventory (/etc/ansible/hosts) looks like this:
Code:
[proxmox3]
proxmox3 ansible_host=10.10.12.3
[proxmoxs:children]
proxmox3

My playbook (~/ansible/playbooks/proxmox-deply.yml) looks like this:
Code:
- name: ‘prep proxmox hosts for automation’
   hosts: proxmox3
   vars_prompt:
   - name: PV_password
     prompt: "PV Password"
     private: yes
   - name: VM_name
     prompt: “VM name”
     private: no
   - name: VM_network
     prompt: “Network associated to ipconfig0”
     private: no
     default: ens18
   - name: VM_IP
     prompt: “VM IP”
     private: no
     default: 192.168.1.100
   - name: VM_sockets
     prompt: “VM socket/s”
     private: no
     default: 1
   - name: VM_cores
     prompt: “VM core/s”
     private: no
     default: 1
   - name: VM_memory
     prompt: “VM RAM Memory (MB)”
     private: no
     default: 1024
   - name: VM_INCREASE_DISK
     prompt: “Increase virtio0 disk (20 GB) in”
     private: no
     default: 0
   roles:
   - { role: proxmox_deploy, default_proxmox_node: proxmox3 }

My task (~/ansible/playbooks/roles/proxmox_deploy/tasks/main.yml) looks like tihs:
Code:
- proxmox_kvm:
    api_user : root@pam
    api_password: “{{ PV_password }}”
    api_host : “{{ default_proxmox_node }}”
    name : “{{ VM_name }}”
    node : “{{ default_proxmox_node }}”
    clone: “{{ VM_template }}”

and my defaults (~/ansible/playbooks/roles/proxmox_deploy/defaults/main.yml) look like this:
Code:
# defaults file for proxmox_deploy
VM_template: debian-template
default_disk: virtio0
default_interface: ens18
default_volume: /dev/vda
default_partition: 2
template_name: template-debian-deployment

I could not find any information on that particular error, other then to check if i have any underscores in my hostnames, and i dont.
Any help or suggestions are appreciated.

Thank you in advance!
Best Regards Nelson32
 
Let me guess: You copied and pasted the demo code from the authors webpage.
Please verify that the " are the correct one.
 
You guessed wrong.
Since this issue is not relevant for me any longer, the thread can be closed.
I totaly forgot that i had opened it.

Best Regards
Nelson32
 
Last edited: