Ansible proxmox module

Discussion in 'Proxmox VE: Installation and configuration' started by Marek, Jan 17, 2019.

  1. Marek

    Marek New Member

    Joined:
    Oct 26, 2017
    Messages:
    16
    Likes Received:
    0
    We are using ansible to manage servers - even windows ones.

    We are using SMBIOS to smugle information - for example i put in SKU label IP address and then with powershell i extract it on VM - then i use this IP address to set static IP. For automation process i would like to use proxmox module for Ansible - do anyone knows how to set SMBIOS with proxmox module for ansible so i can do it on 100+ VMs at once?

    i am asking especialy for command - what command should i execute to set SKU foe e.g 127.0.1.2 using proxmox module for ansible.

    I hope it makes sense for you guys :D
     
  2. morph027

    morph027 Active Member

    Joined:
    Mar 22, 2013
    Messages:
    409
    Likes Received:
    50
    Code:
      - name: update smbios values
        proxmox_kvm:
          api_user: "{{ api_user }}"
          api_password: "{{ api_password }}"
          api_host: "{{ api_host }}"
          node: "{{ node }}"
          name: "{{ name }}"
          smbios: "uuid=foo-bar"
          update: yes
    
    Basically the command would be something like

    Code:
    ansible -i $my-inventory-file $my-hosts-list -m proxmox_kvm -a "api_user=$my-api-user api_password=$my-api-password api_host=$my-api-host node=$node-where-the-vm-is-located-at name=$vm-name smbios='uuid=foo-bar' update=yes"
    
     
  3. LnxBil

    LnxBil Well-Known Member

    Joined:
    Feb 21, 2015
    Messages:
    3,696
    Likes Received:
    331
    Very nice idea.

    Could also cloud-init be used for that? You can also think of it as a kind of "special small database", but storing information in SMBIOS is often the only way to go. I also looked into that a while ago and was saddened that there is no simple "special virtual device" for that. Hardware manufacturers added also BIOS extensions to store windows licensing information, so in principle there are some possibilities.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice