robertdebock.y

y

此角色已被归档,并且不再维护。

处理图像

GitHub GitLab 质量 下载 版本
github gitlab quality downloads 版本

示例剧本

此示例来自 molecule/resources/converge.yml,并在每次推送、拉取请求和发布时进行测试。

---
- 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

机器需要在CI中准备,这通过 molecule/resources/prepare.yml 完成:

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

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

  tasks:
    - name: 在容器中创建目录
      ansible.builtin.file:
        path: "{{ item }}"
        state: directory
        mode: "0644"
      with_items:
        - /data
        - /data/in
        - /data/out

    - name: 将示例文件复制到 /data/in
      ansible.builtin.copy:
        src: in/
        dest: /data/in
        mode: "0644"

另请查看 完整说明和示例 以了解如何使用这些角色。

角色变量

这些变量在 defaults/main.yml 中设置:

---
# y的默认文件

# y_presets 是将应用于图像的预设列表。
# y_presets:
#   - name: monochrome

# y_import_from 定义文件来源路径。
# 例如,这可以是 /dev/sdb1(某些SD卡)。
y_import_from: /tmp/import

# y_export_to 是保存图像的路径。
y_export_to: /tmp/export

需求

需求状态

以下角色用于准备系统。您可以选择以其他方式准备系统,我也测试过这些角色。

需求 GitHub GitLab
robertdebock.bootstrap 构建状态 GitHub 构建状态 GitLab
robertdebock.epel 构建状态 GitHub 构建状态 GitLab

上下文

此角色是许多兼容角色的一部分。有关更多信息,请查看 这些角色的文档

以下是相关角色的概述: 依赖关系

兼容性

此角色已在这些 容器映像 上进行测试:

容器 标签
alpine 全部
amazon 候选
el 7, 8
debian buster, bullseye
fedora 全部
opensuse 全部
ubuntu focal, bionic

所需的最低Ansible版本是2.10,已经对以下版本进行了测试:

  • 上一个版本。
  • 当前版本。
  • 开发版本。

如果您发现问题,请在 GitHub 上注册。

许可

Apache-2.0

作者信息

Robert de Bock

请考虑 赞助我

安装
ansible-galaxy install robertdebock.y
许可证
apache-2.0
下载
150
拥有者
I know my way around (Linux) infrastructure, have a passion for automation, Docker, Ansible, Molecule and ci/cd.