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.
To install this collection and its dependencies, you will need to use the
Ansible ansible-galaxy
command:
ansible-galaxy collection install infra.osbuild
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.
ansible-playbook playbooks/osbuild_setup_server.yml
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:
Example:
ansible-playbook playbooks/osbuild_builder.yml -e builder_compose_type=edge-installer
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.
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
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
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.
Roles:
Modules:
Please see the official Ansible Community Code of Conduct.
GNU General Public License v3.0 or later
We welcome community contributions to this collection. See Contributing to Ansible-maintained collections for complete details.
It's required for new or existing features to have tests for positive and negative scenarios.
The tests are executed by ansible-test
and those run in the CI.
ansible-test units --docker --python $PYTHON_VERSION $TEST_FILE_PATH
ansible-test integration --remote rhel/$RHEL_VERSION $IMAGE_TYPE
rpm-ostree upgrade --check
command. This is caused by an open issue in rpm-ostee found here: https://github.com/coreos/rpm-ostree/issues/4280