Skip to content

Ansible Collection for management of ostree composer

License

Notifications You must be signed in to change notification settings

de1987/infra.osbuild

 
 

Osbuild Composer Ansible Collection

GitHub Super-LinterCodecovOpenSSF Best PracticesOpenSSF Scorecard

Ansible Collection for management of osbuild composer to build rpm-ostree based images for Fedora, Red Hat Enterprise Linux, and Centos Stream. This collection has roles to build an osbuild server, an apache httpd server to host images, and a role to build installer images and rpm-ostree updates.

Installing

To install this collection and its dependencies, you will need to use the Ansible ansible-galaxy command:

ansible-galaxy collection install git+https://github.com/redhat-cop/infra.osbuild

How to use

You will need a RHEL, Centos Stream, or Fedora system that you can connect to remotely via ssh, and a playbook to call the desired roles to result in the desired functionality. Each role has it's own documentation specific to its provided automation.

To use the example playbooks provided in this repository, please create an inventory file that only has the osbuild build server(s) listed in them as these example playbooks use the all Ansible group as the host patten.

Configure Osbuild Builder

ansible-playbook playbooks/osbuild_setup_server.yml

Build an Image

ansible-playbook playbooks/osbuild_builder.yml

You can specify what kind of build you prefer with the variable buidler_compose_type.

Current supported and tested build types are:

  • edge-commit
  • edge-container
  • edge-installer
  • edge-simplified-installer
  • edge-raw-image
  • iot-commit (fedora only)
  • iot-container (fedora only)
  • iot-installer (fedora only)
  • iot-raw-image (fedora only)

Example:

ansible-playbook playbooks/osbuild_builder.yml -e builder_compose_type=edge-installer

Image Hosting

Images are hosted via apache http server that is setup using the setup_server playbook. The images are located at this path on the osbuild server: /var/www/html/<blueprint_name>/images. Inside the image directory will be version subdirectories for each iso built.

Kickstart Hosting

Image kickstart files are also hosted that can be used as a boot option via http on the osbuild server. The path is http://<ip_addr>/<blueprint_name>/kickstart.ks

Auditing versions

You can run rpm-ostree status to see what specific version the system is using.

Here is a sample output:

Deployments:
* edge:rhel/8/x86_64/edge
    Version: 0.0.1 (2023-04-07T19:40:08Z)
    Commit: 7d3461f2fce7572fcdc9b3e8f75677bcdf96afed1ff5a3953f81852aad51f78d

Supported Versions of Ansible

Ansible version compatibility

This collection has been tested against following Ansible versions: >=2.12.

Plugins and modules within a collection may be tested with only specific Ansible versions. A collection may contain metadata that identifies these versions. PEP440 is the schema used to describe the versions of Ansible.

Tested with Ansible

  • ansible-core 2.14 (devel)
  • ansible-core 2.13 (stable)
  • ansible-core 2.12 (stable)

Code of Conduct

Please see the official Ansible Community Code of Conduct.

Licensing

GNU General Public License v3.0 or later

About

Ansible Collection for management of ostree composer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 85.3%
  • Shell 11.2%
  • Jinja 3.5%