community.general.layman module – Manage Gentoo overlays

Note

This module is part of the community.general collection (version 7.5.2).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.general. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: community.general.layman.

Synopsis

  • Uses Layman to manage an additional repositories for the Portage package manager on Gentoo Linux. Please note that Layman must be installed on a managed node prior using this module.

Aliases: packaging.os.layman

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 2.6

  • layman python module

Parameters

Parameter

Comments

list_url

aliases: url

string

An URL of the alternative overlays list that defines the overlay to install. This list will be fetched and saved under ${overlay_defs}/${name}.xml, where overlay_defs is read from the Layman’s configuration.

name

string / required

The overlay id to install, synchronize, or uninstall. Use ‘ALL’ to sync all of the installed overlays (can be used only when state=updated).

state

string

Whether to install (present), sync (updated), or uninstall (absent) the overlay.

Choices:

  • "present" ← (default)

  • "absent"

  • "updated"

validate_certs

boolean

If false, SSL certificates will not be validated. This should only be set to false when no other option exists. Prior to 1.9.3 the code defaulted to false.

Choices:

  • false

  • true ← (default)

Attributes

Attribute

Support

Description

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: none

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode.

Examples

- 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

Authors

  • Jakub Jirutka (@jirutka)