network/tests/setup-snapshot.yml
Rich Megginson 3cbb6b24c1 add setup-snapshot.yml used to prepare testing snapshots
When running CI tests, test performance can be improved by creating a
snapshot image to use for the test, pre-installed with packages used by
the role tests.  The CI system can use tests/setup-snapshot.yml to
prepare the snapshot image.  Rather than having a list of packages to
install in multiple places, the code which ensures the facts and
variables is moved to a separate tasks/set_facts.yml so that the setup
playbook can use `tasks_from: set_facts.yml` to get the list of network
packages to install.  NOTE: The network role developers should add
additional packages to setup-snapshot.yml for other packages installed
by other tests.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2022-04-27 23:01:00 +02:00

12 lines
285 B
YAML

- hosts: all
tasks:
- name: Set facts used by role
include_role:
name: linux-system-roles.network
tasks_from: set_facts.yml
public: true
- name: Install test packages
package:
name: "{{ network_packages }}"
state: present