mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 10:25:28 +00:00
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>
12 lines
285 B
YAML
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
|