ansible

  1. S

    Unattended install of Ceph using pveceph

    I am attempting to write an Ansible playbook that sets up my Proxmox cluster. One issue I'm running into is pveceph install doesn't have a non-interactive option. I've tried setting DEBIAN_FRONTEND=noninteractive on the task like this: - name: Install Ceph environment: DEBIAN_FRONTEND...
  2. E

    Build Proxmox from an ISO image to a full server with VMs.

    I am looking for a way to build a Proxmox server from an ISO disk. Effectively, I need to build a field server that is a Proxmox-based system built with the automated installation file. The running Ansible-pull as an Ansible user to execute a build operation to install and set up multiple VMs...
  3. S

    [SOLVED] Has anyone managed to set tags on a VM with Ansible?

    I cannot get tags on a VM created with Ansible, no matter how I try it. All I can do is set the tag manually after the VM has been created and started. The template I use is created in a separate stage, also with Ansible. I could of course try to set tags on the template, but I don't want to...
  4. D

    Proxmox inventory source: Access PVE network configuration to set ansible_host with compose

    Hello, I'm dealing with proxmox inventory source in ansible. I have collection community.proxmox in it's latest version 1.3.0. As I learned from community.proxmox.proxmox inventory docs, We are able to set ansible_host with compose. I have my ansible.cfg: [defaults] inventory =...
  5. F

    Questions Regarding Automation

    I have been working Proxmox for about a year and a half now and feel pretty comfortable with the platform. I can create VMs/containers, manage storage (using Ceph), handle networking, create cloud-init templates, etc. Now I want to take the next step and automate my infrastructure. I have some...
  6. A

    PBS configuration via ansible

    Hello I'm trying to do basic configuration via Ansible: users, acl, passwords, etc. And i'm kinda stuck with populating users Looks like user.cfg does not accept comments and it is mandatory to have blank line between each definition of user. Otherwise login is breaking. So manipulating...
  7. V

    [SOLVED] Set static IP to cloned VM with Cloud-init initialisation.

    Dear all, I am trying to clone my VM template while setting up a static ip. As I am using Ansible, I try to use the community.general.proxmox_kvm module. However, I do not get the VM to have a static ip. For the template I use a Debian 12 (bookworm) template using Learn Linux Tv's guide. Below...
  8. N

    SSH connection to LXC container dropping when using Ansible

    This is a weird one, as I'm honestly not sure if it's a firewall thing, some kind of out-of-the box security thing or an Ansible thing but here goes: I've got a fresh LXC container that I'm planning to use Ansible to configure. I have setup some firewall rules so that SSH into it just fine...
  9. I

    Alpine LXC container's lack of ssh causes problems for automated installation

    Because Alpine's container doesn't ship with openssh, or configure it, it's difficult/impossible to use under automated conditions like under Ansible. When doing it by hand it's not such a big issue. Unfortunately, there's no easy way (I can find at least) that Ansible can login through the...
  10. M

    Current state of art for configuring host networking via ansible?

    Looking at templating out our deployments, and found this thread from ten years ago which uses ansible shell combined with pvesh, which would work just fine but I'm hoping there's some ansible.community.something module that's actually intended for automation of proxmox hosts themselves. Am...
  11. B

    Ansible automation

    I am trying to setup an os_patching role to log into proxmox and take snapshots. I have installed the ansible collection after doing some research. I am running this on RHEL 9. Here is the output of the ansible collections: ~]$ ansible-galaxy collection list #...
  12. M

    API: get running replications (before node update)

    Hello, currently I'm writing an ansible / python / proxmoxer update script for my 2,5-node(*) cluster using the webapi for proxmox. Before I start an update for a node, I set the maintainence mode and disable all replication jobs. I can get all replication jobs via webapi - but how can I check...
  13. E

    [SOLVED] [Workaround] How to refer via API to a downloaded image file stored in the images folder?

    I am trying to automate creation of my Ubuntu VM in Proxmox using Ansible, proxmoxer, and cloudinit. I've seen (old) tutorial videos download the Ubuntu cloudinit IMG file to the /var/lib/vz/images path and then successfully use the image file by using the volume name...
  14. O

    Ansible vs. Vagrant for Proxmox automation

    Hello, I have been spending the last couple of days making a Vagrant-provider plugin work, which seems to have been originally created by a German company called TelCat GmbH (no longer exists). The code base is outdated: https://github.com/SecSamDev/vagrant-proxmox After creating a legacy...
  15. F

    Proxmox Automation with Packer/Ansible/Kestra

    Hello! I want to share a small home project I’ve been working on for the past few months. I was looking for solutions for a certain implementation for packer and ansible on the forum, but I couldn’t find it here or in any GitHub repos. I used Packer for template creation because it gives a...
  16. M

    Ansible direct connection to containers using PVE as a proxy

    I'm using Ansible to connect to containers and VM's via SSH, but I'm wondering if there is a better way to do it using PVE as a proxy, given there are tools such as pct exec, pct enter, and pct console that allow Proxmox to send commands directly to the containers. This would allow to connect to...
  17. M

    python3-lxc and other lxc related packages conflicting with liblxc1

    In order to get Ansible lxc-container module to work on PVE, I'm trying to install python3-lxc, but it is conflicting with liblxc1. There are other reports of lxc related packages, such as lxc-templates, and others conflicting with the same library, but I could not find a solution. Am I missing...
  18. W

    Automate vm build with bitbucket

    Hi all, bit of a weird one in terms of direction with this issue but that's what I need help with, the direction. I'm using a Proxmox node (love it) just started using Cloud init and VM templates more. I'm getting a bit overwhelmed with what to do about automation in regards to deploying using...
  19. R

    TASK ERROR: can't lock file '/run/lock/lxc/pve-config-100.lock' - got timeout

    Hi! I've been facing the above mentioned error (check the tread title) for the past few days and I've got no solution yet. The error appears every single time I create & start a new LXC using OpenTofu and Ansible from a remote machine (using Debian through WSL). Actually OpenTofu doesn't...
  20. M

    Tags permission

    Hello, I was just curious about the strange permissions for tags: With the VM.Config.Options permission on /vms, one can add any tags they want, except the registered ones. No matter the individual configuration of registered ones. This setting can only be restricted more, not less. So, for...