robertdebock.image_builder

image_builder

This lets your system use Lorax, an image builder tool.

Travis GitHub Quality Downloads Version
travis github quality downloads Version

Example Playbook

This example is taken from molecule/resources/converge.yml and is tested every time there's a push, pull request, or release.

---
- name: converge
  hosts: all
  become: yes
  gather_facts: yes

  roles:
    - role: robertdebock.image_builder

You might need to prepare the machine using molecule/resources/prepare.yml:

---
- name: prepare
  hosts: all
  become: yes
  gather_facts: no

  roles:
    - role: robertdebock.bootstrap

For verification, molecule/resources/verify.yml runs after applying the role.

---
- name: Verify
  hosts: all
  become: yes
  gather_facts: no

  tasks:
    - name: check if connection still works
      ping:

You can find a full explanation and example on how to use these roles.

Role Variables

These variables are set in defaults/main.yml:

---
# defaults file for image_builder

image_builder_product: blueprint-name
image_builder_description: My first blueprint
image_builder_version: 0.0.1

image_builder_installed_packages:
  - name: screen
    version: "4.*"
  - name: lsof
    version: "*"

# Choose from these options: alibaba, ami, ext4-filesystem, google, live-iso,
# openstack, partitioned-disk, qcow2, tar, vhd or vmdk
image_builder_type: tar

Requirements

  • Access to a repository with packages, likely on the internet.
  • A recent version of Ansible. (Tests are done on the current, previous, and next Ansible releases.)

To meet all requirements, these roles can be installed using ansible-galaxy install -r requirements.yml:

---
- robertdebock.bootstrap

Context

This role is part of many compatible roles. Check the documentation of these roles for more information.

Here's an overview of related roles: dependencies

Compatibility

This role works with these container images:

container tags
el 7, 8
fedora all

The minimum required version of Ansible is 2.9. Tests have been completed on:

  • The previous version.
  • The current version.
  • The development version.

Testing

Unit tests are performed for every commit, pull request, release, and on a regular basis.

If you encounter any issues, please report them in GitHub.

Testing uses Tox and Molecule:

Tox tests different Ansible versions. Molecule tests various distributions.

To test with the defaults (any installed Ansible version, namespace: robertdebock, image: fedora, tag: latest):

molecule test

# Or select a specific image:
image=ubuntu molecule test
# Or select a specific image and a specific tag:
image="debian" tag="stable" tox

You can also test multiple versions of Ansible and select images: Tox lets you test multiple Ansible versions. To run the default tests (namespace: robertdebock, image: fedora, tag: latest):

tox

# To run CentOS (namespace: `robertdebock`, tag: `latest`)
image="centos" tox
# Or customize more:
image="debian" tag="stable" tox

License

Apache-2.0

Author Information

Robert de Bock

Consider sponsoring me.

Informazioni sul progetto

Allow your system to use Lorax, the image builder.

Installa
ansible-galaxy install robertdebock.image_builder
Licenza
apache-2.0
Download
94
Proprietario
I know my way around (Linux) infrastructure, have a passion for automation, Docker, Ansible, Molecule and ci/cd.