community.general.portage (8.5.0) — module

Package manager for Gentoo

Authors: William L Thomson Jr (@wltjr), Yap Sok Ann (@sayap), Andrew Udvare (@Tatsh)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Manages Gentoo packages

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Make sure package foo is installed
  community.general.portage:
    package: foo
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Make sure package foo is not installed
  community.general.portage:
    package: foo
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update package foo to the latest version (os specific alternative to latest)
  community.general.portage:
    package: foo
    update: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install package foo using PORTAGE_BINHOST setup
  community.general.portage:
    package: foo
    getbinpkg: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Re-install world from binary packages only and do not allow any compiling
  community.general.portage:
    package: '@world'
    usepkgonly: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Sync repositories and update world
  community.general.portage:
    package: '@world'
    update: true
    deep: true
    sync: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove unneeded packages
  community.general.portage:
    depclean: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove package foo if it is not explicitly needed
  community.general.portage:
    package: foo
    state: absent
    depclean: true

Inputs

    
deep:
    default: false
    description:
    - Consider the entire dependency tree of packages (--deep)
    type: bool

jobs:
    description:
    - Specifies the number of packages to build simultaneously.
    - 'Since version 2.6: Value of 0 or False resets any previously added'
    - --jobs setting values
    type: int

sync:
    choices:
    - web
    - 'yes'
    - 'no'
    description:
    - Sync package repositories first
    - If V(yes), perform "emerge --sync"
    - If V(web), perform "emerge-webrsync"
    type: str

quiet:
    default: false
    description:
    - Run emerge in quiet mode (--quiet)
    type: bool

state:
    choices:
    - present
    - installed
    - emerged
    - absent
    - removed
    - unmerged
    - latest
    default: present
    description:
    - State of the package atom
    type: str

newuse:
    default: false
    description:
    - Include installed packages where USE flags have changed (--newuse)
    type: bool

nodeps:
    default: false
    description:
    - Only merge packages but not their dependencies (--nodeps)
    type: bool

update:
    default: false
    description:
    - Update packages to the best version available (--update)
    type: bool

usepkg:
    default: false
    description:
    - Tries to use the binary package(s) in the locally available packages directory.
    type: bool

loadavg:
    description:
    - Specifies that no new builds should be started if there are
    - other builds running and the load average is at least LOAD
    - 'Since version 2.6: Value of 0 or False resets any previously added'
    - --load-average setting values
    type: float

oneshot:
    default: false
    description:
    - Do not add the packages to the world file (--oneshot)
    type: bool

package:
    aliases:
    - name
    description:
    - Package atom or set, for example V(sys-apps/foo) or V(>foo-2.13) or V(@world)
    elements: str
    type: list

verbose:
    default: false
    description:
    - Run emerge in verbose mode (--verbose)
    type: bool

depclean:
    default: false
    description:
    - Remove packages not needed by explicitly merged packages (--depclean)
    - If no package is specified, clean up the world's dependencies
    - Otherwise, --depclean serves as a dependency aware version of --unmerge
    type: bool

onlydeps:
    default: false
    description:
    - Only merge packages' dependencies but not the packages (--onlydeps)
    type: bool

backtrack:
    description:
    - Set backtrack value (C(--backtrack)).
    type: int
    version_added: 5.8.0
    version_added_collection: community.general

getbinpkg:
    default: false
    description:
    - Prefer packages specified at C(PORTAGE_BINHOST) in C(make.conf).
    type: bool

keepgoing:
    default: false
    description:
    - Continue as much as possible after an error.
    type: bool

noreplace:
    default: true
    description:
    - Do not re-emerge installed packages (--noreplace)
    type: bool

quietfail:
    default: false
    description:
    - Suppresses display of the build log on stdout (--quiet-fail)
    - Only the die message and the path of the build log will be
    - displayed on stdout.
    type: bool

withbdeps:
    description:
    - Specifies that build time dependencies should be installed.
    type: bool
    version_added: 5.8.0
    version_added_collection: community.general

quietbuild:
    default: false
    description:
    - Redirect all build output to logs alone, and do not display it
    - on stdout (--quiet-build)
    type: bool

usepkgonly:
    default: false
    description:
    - Merge only binaries (no compiling).
    type: bool

changed_use:
    default: false
    description:
    - Include installed packages where USE flags have changed, except when
    - flags that the user has not enabled are added or removed
    - (--changed-use)
    type: bool

getbinpkgonly:
    default: false
    description:
    - Merge only packages specified at C(PORTAGE_BINHOST) in C(make.conf).
    type: bool
    version_added: 1.3.0
    version_added_collection: community.general