community.general.layman 模块 – 管理 Gentoo 覆盖层

注意

此模块是 community.general 集合 (版本 10.1.0) 的一部分。

如果您正在使用 ansible 包,您可能已经安装了这个集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install community.general。您需要进一步的要求才能使用此模块,请参阅 要求 了解详细信息。

要在 playbook 中使用它,请指定:community.general.layman

概要

  • 使用 Layman 管理 Gentoo Linux 上 Portage 包管理器的其他存储库。请注意,在使用此模块之前,必须在托管节点上安装 Layman。

要求

在执行此模块的主机上需要以下要求。

  • layman python 模块

参数

参数

注释

list_url

别名:url

字符串

定义要安装的覆盖层的备用覆盖层列表的 URL。此列表将被获取并保存到 ${overlay_defs}/${name}.xml 下,其中 overlay_defs 是从 Layman 的配置中读取的。

名称

字符串 / 必需

要安装、同步或卸载的覆盖层 ID。使用“ALL”同步所有已安装的覆盖层(仅当 state=updated 时可用)。

状态

字符串

是要安装 (present)、同步 (updated) 还是卸载 (absent) 覆盖层。

选项

  • "present" ← (默认)

  • "absent"

  • "updated"

validate_certs

布尔值

如果为 false,则不会验证 SSL 证书。只有在没有其他选项时,才应将其设置为 false。在 1.9.3 之前的版本中,代码默认为 false

选项

  • false

  • true ← (默认)

属性

属性

支持

描述

check_mode

支持: 完全

可以在 check_mode 中运行,并在不修改目标的情况下返回更改状态预测。

diff_mode

支持:

在差异模式下,将返回已更改的内容(或可能需要在 check_mode 中更改的内容)的详细信息。

示例

- name: Install the overlay mozilla which is on the central overlays list
  community.general.layman:
    name: mozilla

- name: Install the overlay cvut from the specified alternative list
  community.general.layman:
    name: cvut
    list_url: 'http://raw.github.com/cvut/gentoo-overlay/master/overlay.xml'

- name: Update (sync) the overlay cvut or install if not installed yet
  community.general.layman:
    name: cvut
    list_url: 'http://raw.github.com/cvut/gentoo-overlay/master/overlay.xml'
    state: updated

- name: Update (sync) all of the installed overlays
  community.general.layman:
    name: ALL
    state: updated

- name: Uninstall the overlay cvut
  community.general.layman:
    name: cvut
    state: absent

作者

  • Jakub Jirutka (@jirutka)