Skip to content

Can not create virtual machine with primary_ip4 parameter #607

Answered by rodvand
futurearchitec asked this question in Q&A
Discussion options

You must be logged in to vote

So this is an example playbook which works (just tested it):

---

- hosts: localhost
  connection: local
  gather_facts: false
  tasks:
    - name: Creating Virtual Machine
      netbox.netbox.netbox_virtual_machine:
        netbox_url: http://localhost:32768
        netbox_token: 0123456789abcdef0123456789abcdef01234567
        data:
          name: Test Virtual Machine
          cluster: Test

    - name: Create VM Interface
      netbox.netbox.netbox_vm_interface:
        netbox_url: http://localhost:32768
        netbox_token: 0123456789abcdef0123456789abcdef01234567
        data:
          name: eth0
          virtual_machine: Test Virtual Machine

    - name: Create IP address
     …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rodvand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #606 on October 01, 2021 11:29.