Ansible and Proxmox

Luc.JUBEAU

New Member
Jan 31, 2023
3
0
1
Hi,

I would like to deploy a VM with Ansible. I have installed proxmoxer on my pve and setup a playbook like this:
- name: test
hosts: "Proxmox"
tasks:
- name: create a vm
proxmox_kvm:
api_user: root@pam
api_password: " Password"
api_host: "default_node"
node: " pv_node"
name: "vm_name"

When i have launched it. I have this results:
"msg": "HTTPSConnectionPool(host='pr1', port=8006): Max retries exceeded with url: /api2/json/access/ticket (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f3b02094ac0>: Failed to establish a new connection: [Errno -2] Name or service not known'))"

Firstly, have i done the right things ?
Have you some idea about this issue ?

Thnaks for your answers.
 
thanks bbgeek17

that's worked

But now i want to deploy a vm from an ISO with ansible. What have i to do ? Is that possible ?
 
almost anything is possible, the amount of effort is the what varies. What you do with an ISO inside the VM has few if any dependencies on the hypervisor.
Plug this into google to start with "ubuntu iso install ansible". A cursory overview of the second result suggests that it might work for your goal:
https://rutgerblom.com/2020/07/27/automated-ubuntu-server-20-04-installation-with-ansible/

Good luck

Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!