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

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

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