Skip to content

Ansible role for RHEL Image Builder

Notifications You must be signed in to change notification settings

hasib-haque/rhel-image

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RHEL Image Builder Role

License: GPLv3

Ansible role for building RHEL images with Image Builder.

Quick Usage Example

This role builds custom RHEL images with RHEL Image Builder. The role uses a given image blueprint from a Git repository and stores results on the build host.

To install this collection from GitHub:

ansible-galaxy collection install git+https://github.com/myllynen/rhel-image,master

Next, in a blueprint repository customize an image blueprint:

vi base-image.toml
git commit -m "Update base-image" base-image.toml
git push

Then, create a playbook to use this role:

---
- name: Build RHEL image with Image Builder
  hosts: all
  become: true
  vars:
    rhel_image_create_user: false
    rhel_image_git_remote_repo: file:///tmp/rhel-image-blueprints.git
    rhel_image_git_repo_checkout: master
    rhel_image_blueprint: base-image
    rhel_image_size_kb: 20480
    rhel_image_output_type: qcow2
    rhel_image_download_dir: /tmp/images
  roles:
    - myllynen.rhel_image.rhel_image

See roles/rhel_image/defaults/main.yml for all the supported parameters.

Finally, build the image on a build host:

ansible-playbook -i 192.168.122.123, image_builder.yml

See Also

See also https://github.com/myllynen/ansible-packer.

See also https://github.com/myllynen/rhel-ansible-roles.

License

GPLv3+

About

Ansible role for RHEL Image Builder

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published