:tocdepth: 0 .. _/plugins/prepare: Prepare Plugins ~~~~~~~~~~~~~~~ .. _plugins/prepare/ansible: ansible ------- .. warning:: Please, be aware that the documentation below is a work in progress. We are working on fixing it, adding missing bits and generally making it better. Also, it was originaly used for command line help only, therefore the formatting is often suboptional. Prepare guest using Ansible. Run a single playbook on the guest: .. code-block:: yaml prepare: how: ansible playbook: ansible/packages.yml Run multiple playbook in one phase, with extra arguments for ``ansible-playbook``: .. code-block:: yaml prepare: how: ansible playbook: - playbook/one.yml - playbook/two.yml - playbook/three.yml extra-args: '-vvv' Remote playbooks can be referenced as well as local ones, and both kinds can be intermixed: .. code-block:: yaml prepare: how: ansible playbook: - playbook/one.yml - https://foo.bar/two.yml - playbook/three.yml The playbook path must be relative to the metadata tree root. The playbook path should be relative to the metadata tree root. Configuration ^^^^^^^^^^^^^ extra-args: ``EXTRA-ARGS`` Optional arguments for ``ansible-playbook``. Default: *not set* playbook: ``PATH|URL`` Path or URL of an ansible playbook to run. The playbook path must be relative to the metadata tree root. Default: *not set* Common Keys """"""""""" name: The name of the step phase. order: Order in which the phase should be handled. Default: ``50`` summary: Concise summary describing purpose of the phase. Default: *not set* where: ``GUEST|ROLE`` Run this phase on given guest or guests with the given role only. Default: *not set* ---- .. _plugins/prepare/feature: feature ------- .. warning:: Please, be aware that the documentation below is a work in progress. We are working on fixing it, adding missing bits and generally making it better. Also, it was originaly used for command line help only, therefore the formatting is often suboptional. Enable or disable common features like repositories on the guest. Example config: .. code-block:: yaml prepare: how: feature epel: enabled Or .. code-block:: yaml prepare: how: feature epel: disabled Configuration ^^^^^^^^^^^^^ epel: ``enabled|disabled`` Whether EPEL repository should be installed & enabled or disabled. Default: *not set* Common Keys """"""""""" name: The name of the step phase. order: Order in which the phase should be handled. Default: ``50`` summary: Concise summary describing purpose of the phase. Default: *not set* where: ``GUEST|ROLE`` Run this phase on given guest or guests with the given role only. Default: *not set* ---- .. _plugins/prepare/install: install ------- .. warning:: Please, be aware that the documentation below is a work in progress. We are working on fixing it, adding missing bits and generally making it better. Also, it was originaly used for command line help only, therefore the formatting is often suboptional. Install packages on the guest. Example config: .. code-block:: yaml prepare: how: install copr: psss/tmt package: tmt-all missing: fail Use ``copr`` for enabling desired Copr repository and ``missing`` to choose whether missing packages should be silently ignored (``skip``) or a preparation error should be reported (``fail``), which is the default. In addition to package name you can also use one or more paths to local rpm files to be installed: .. code-block:: yaml prepare: how: install package: - tmp/RPMS/noarch/tmt-0.15-1.fc31.noarch.rpm - tmp/RPMS/noarch/python3-tmt-0.15-1.fc31.noarch.rpm Use ``directory`` to install all packages from given folder and ``exclude`` to skip selected packages: .. code-block:: yaml prepare: how: install directory: tmp/RPMS/noarch exclude: tmt+provision-virtual .. note:: When testing ostree booted deployments tmt will use ``rpm-ostree`` as the package manager to perform the installation of requested packages. The current limitations of the ``rpm-ostree`` implementation are: * Cannot install new version of already installed local rpm. * No support for installing debuginfo packages at this time. Configuration ^^^^^^^^^^^^^ copr: ``REPO`` Copr repository to be enabled. Default: *not set* directory: ``PATH`` Path to a local directory with rpm packages. Default: *not set* exclude: ``PACKAGE`` Packages to be skipped during installation. Default: *not set* missing: ``ACTION`` Action on missing packages, fail (default) or skip. Default: ``fail`` package: ``PACKAGE`` Package name or path to rpm to be installed. Default: *not set* Common Keys """"""""""" name: The name of the step phase. order: Order in which the phase should be handled. Default: ``50`` summary: Concise summary describing purpose of the phase. Default: *not set* where: ``GUEST|ROLE`` Run this phase on given guest or guests with the given role only. Default: *not set* ---- .. _plugins/prepare/shell: shell ----- .. warning:: Please, be aware that the documentation below is a work in progress. We are working on fixing it, adding missing bits and generally making it better. Also, it was originaly used for command line help only, therefore the formatting is often suboptional. Prepare guest using shell (Bash) scripts. Run various commands and scripts on the guest: .. code-block:: yaml prepare: how: shell script: - sudo dnf install -y 'dnf-command(copr)' - sudo dnf copr enable -y psss/tmt - sudo dnf install -y tmt Configuration ^^^^^^^^^^^^^ script: ``SCRIPT`` Shell script to be executed. Can be used multiple times. Default: *not set* Common Keys """"""""""" name: The name of the step phase. order: Order in which the phase should be handled. Default: ``50`` summary: Concise summary describing purpose of the phase. Default: *not set* where: ``GUEST|ROLE`` Run this phase on given guest or guests with the given role only. Default: *not set*