Finish Plugins
Common Keys
The following keys are accepted by all plugins of the finish
step.
- 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
- when:
RULE
If specified, phase is run only if any rule matches plan context.
Default: not set
- where:
GUEST|ROLE
Run this phase on given guest or guests with the given role only.
Default: not set
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 originally used for command line help only, therefore the formatting is often suboptimal.
Perform finishing tasks using ansible
Warning
The plugin may be a subject of various limitations, imposed by Ansible itself:
Ansible 2.17+ no longer supports Python 3.6 and older. Guests where Python 3.7+ is not available cannot be prepared with the
ansible
plugin. This has been observed when Fedora Rawhide runner is used with CentOS 7 or CentOS Stream 8 guests. Possible workarounds: downgrade Ansible tmt uses, or install Python 3.7+ before usingansible
plugin from an alternative repository or local build.
Single playbook config:
finish:
how: ansible
playbook: ansible/packages.yml
Multiple playbooks config:
finish:
how: ansible
playbook:
- playbook/one.yml
- playbook/two.yml
- playbook/three.yml
The playbook path should be relative to the metadata tree root. Use ‘order’ attribute to select in which order finishing tasks should happen if there are multiple configs. Default order is ‘50’.
Configuration
See also Common Keys accepted by the plugin.
- extra-args:
ANSIBLE-PLAYBOOK-OPTIONS
Additional CLI options 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
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 originally used for command line help only, therefore the formatting is often suboptimal.
Perform finishing tasks using shell (bash) scripts
Example config:
finish:
how: shell
script:
- upload-logs.sh || true
- rm -rf /tmp/temporary-files
Use the ‘order’ attribute to select in which order finishing tasks should happen if there are multiple configs. Default order is ‘50’.
Configuration
See also Common Keys accepted by the plugin.
- script:
SCRIPT
Shell script to be executed. Can be used multiple times.
Default: not set