Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

robertdebock/ansible-role-y

THIS ROLE HAS BEEN ARCHIVED AND IS NOT MAINTAINED.

Process images

GitHub GitLab Quality Downloads Version
github gitlab quality downloads Version

This example is taken from molecule/resources/converge.yml and is tested on each push, pull request and release.

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

  roles:
    - role: robertdebock.y
      y_import_from: /data/in
      y_export_to: files/out
      y_presets:
        - name: monochrome

The machine needs to be prepared in CI this is done using molecule/resources/prepare.yml:

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

  roles:
    - role: robertdebock.bootstrap
    - role: robertdebock.epel

  tasks:
    - name: create directories in container
      ansible.builtin.file:
        path: "{{ item }}"
        state: directory
        mode: "0644"
      with_items:
        - /data
        - /data/in
        - /data/out

    - name: copy samples files to /data/in
      ansible.builtin.copy:
        src: in/
        dest: /data/in
        mode: "0644"

Also see a full explanation and example on how to use these roles.

These variables are set in defaults/main.yml:

---
# defaults file for y

# y_presets is a list of presets that will be applied to images.
# y_presets:
#   - name: monochrome

# y_import_from defines the path where to pickup files from.
# This could be /dev/sdb1 (for some SD-card) for example.
y_import_from: /tmp/import

# y_export_to is the path where the images will be saved.
y_export_to: /tmp/export

The following roles are used to prepare a system. You may choose to prepare your system in another way, I have tested these roles as well.

Requirement GitHub GitLab
robertdebock.bootstrap Build Status GitHub Build Status GitLab
robertdebock.epel Build Status GitHub Build Status GitLab

This role is a part of many compatible roles. Have a look at the documentation of these roles for further information.

Here is an overview of related roles: dependencies

This role has been tested on these container images:

container tags
alpine all
amazon Candidate
el 7, 8
debian buster, bullseye
fedora all
opensuse all
ubuntu focal, bionic

The minimum version of Ansible required is 2.10, tests have been done to:

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

If you find issues, please register them in GitHub

Apache-2.0

Robert de Bock

Please consider sponsoring me.