ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Cross platform automated patch management

    IT Discussion
    linux windows mac osx patching updates
    12
    22
    2.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • stacksofplatesS
      stacksofplates
      last edited by stacksofplates

      So I told @fuznutz04 the other night I'd send him my Ansible role that creates KVM guests and I completely forgot. Here's a link to what I wrote: https://hooks.technology/2017/10/create-vms-on-kvm-with-ansible/

      There is also a library that Larry Smith wrote. Here's a link to the PR https://github.com/ansible/ansible/pull/39340. I just copied what he wrote and put it in my libraries folder so I can use it as a custom module. This module will actually clone a template for you. Here's his example:

      ---
      - hosts:          kvm
        vars:
          vm_template:  ubuntu1604-packer-template
          vms:
            - name:     app01
              state:    started
              template: "{{ vm_template }}"
            - name:     db01
              state:    started
              template: "{{ vm_template }}"
            - name:     lb01
              state:    started
              template: "{{ vm_template }}"
            - name:     web01
              state:    started
              template: "{{ vm_template }}"
        tasks:
          - name:       Cloning VMs
            virt_clone:
              name:     "{{ item['name'] }}"
              state:    "{{ item['state'] }}"
              template: "{{ item['template'] }}"
              uuid:     "{{ item['uuid']|default(omit) }}"
            become:     true
            loop:       "{{ vms }}"
      

      Sorry it took so long to get this out there.

      1 Reply Last reply Reply Quote 2
      • stacksofplatesS
        stacksofplates
        last edited by

        This is the provider I use to clone KVM guests with Terraform https://github.com/dmacvicar/terraform-provider-libvirt

        1 Reply Last reply Reply Quote 1
        • 1
        • 2
        • 2 / 2
        • First post
          Last post