Giter VIP home page Giter VIP logo

rhel-edge-kvm-role's Introduction

RHEL Edge KVM Deployer role

This role is used to deploy RHEL Edge KVM images that where build from fleet mananger.

ansible-lint

Requirements

  • Ansible 2.9 or higher
ansible-galaxy collection install community.libvirt
ansible-galaxy collection install ansible.posix
ansible-galaxy collection install community.general
  • NMAP
sudo yum install nmap -y

Role Variables

iso_url: "https://example.com/rhel-edge-kvm.iso"
libvirt_image_dir: /var/lib/libvirt/images
libvirt_iso_dir:  /var/lib/libvirt/images
libvirt_iso_name: rhel-edge-kvm.iso
libvirt_vm_name:  rhel-edge-kvm
template_dir: /tmp/
libvirt_defaults:
  edge_device:
    cpu: 2
    memory: 2097152 

virtual_machines:
  - name: "{{ libvirt_vm_name }}"
    hostname: "{{ libvirt_vm_name }}" # there is a character limit with the hostname it will brake sysprep
    password: "{{ libvirt_vm_name }}"
    os: "rhel85"
    isos:
      - name: "{{ libvirt_iso_name }}"
        dev: sdb
    disk_size: 20G
    image_index: 2
    image_name: "RHEL Edge image"
    disk_iso: "{{ libvirt_vm_name }}"
    connection_type: "bridge" # "bridge" or "network" bridge is default
    bridgename: "provisioning" 
    bridge_mac: "{{ '52:54:00' | community.general.random_mac }}"
    vlanid: 0 # use 503 in network mode for emulated lab or 0 in hardware bridge mode
    subnet: "192.168.1.1/24"
    secondary_dns: 1.1.1.1

Dependencies

  • Ansible 2.9 or higher
sudo ansible-galaxy install git+https://github.com/tosin2013/rhel-edge-kvm-role.git --force

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

cat edge_vm.yml
- hosts: client
  roles:
    - rhel-edge-kvm-role

cat hosts
[client]
localhost   ansible_connection=local

CREATE A VM

sudo ansible-playbook  -i hosts edge_vm.yml -t download_iso,create_kvm_vm -K

Destroy a VM

sudo ansible-playbook  -i hosts edge_vm.yml -t destroy_kvm_vm -K

License

BSD

Author Information

Tosin Akinosho

rhel-edge-kvm-role's People

Contributors

tosin2013 avatar

Stargazers

Roman avatar

Watchers

 avatar  avatar

Forkers

red-hat-se-rto

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.