Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add setup snapshot to install packages into snapshot #260

Merged
merged 1 commit into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
---
- name: Set version specific variables
include_vars: "{{ lookup('first_found', ffparams) }}"
vars:
ffparams:
files:
- "{{ ansible_facts['distribution'] }}_\
{{ ansible_facts['distribution_major_version'] }}.yml"
- "{{ ansible_facts['distribution'] }}.yml"
- "{{ ansible_facts['os_family'] }}.yml"
paths:
- "{{ role_path }}/vars"
- name: set platform/version specific variables
include_tasks: tasks/set_vars.yml

- name: define an empty list of pools to be used in testing
set_fact:
Expand Down
15 changes: 15 additions & 0 deletions tasks/set_vars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
- name: Set platform/version specific variables
include_vars: "{{ __vars_file }}"
loop:
- "{{ ansible_facts['os_family'] }}.yml"
- "{{ ansible_facts['distribution'] }}.yml"
- >-
{{ ansible_facts['distribution'] ~ '_' ~
ansible_facts['distribution_major_version'] }}.yml
- >-
{{ ansible_facts['distribution'] ~ '_' ~
ansible_facts['distribution_version'] }}.yml
vars:
__vars_file: "{{ role_path }}/vars/{{ item }}"
when: __vars_file is file
12 changes: 12 additions & 0 deletions tests/setup-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- hosts: all
tasks:
- name: Set platform/version specific variables
include_role:
name: linux-system-roles.storage
tasks_from: set_vars.yml
public: true

- name: Install test packages
package:
name: "{{ blivet_package_list }}"
state: present
13 changes: 13 additions & 0 deletions tests/tests_create_lvm_cache_then_remove_nvme_generated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
# This file was generated by generate_tests.py
- hosts: all
tags:
- tests::nvme
tasks:
- name: set disk interface for test
set_fact:
storage_test_use_interface: "nvme"

- import_playbook: tests_create_lvm_cache_then_remove.yml
tags:
- tests::nvme
13 changes: 13 additions & 0 deletions tests/tests_create_lvm_cache_then_remove_scsi_generated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
# This file was generated by generate_tests.py
- hosts: all
tags:
- tests::scsi
tasks:
- name: set disk interface for test
set_fact:
storage_test_use_interface: "scsi"

- import_playbook: tests_create_lvm_cache_then_remove.yml
tags:
- tests::scsi
13 changes: 13 additions & 0 deletions tests/tests_fatals_cache_volume_nvme_generated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
# This file was generated by generate_tests.py
- hosts: all
tags:
- tests::nvme
tasks:
- name: set disk interface for test
set_fact:
storage_test_use_interface: "nvme"

- import_playbook: tests_fatals_cache_volume.yml
tags:
- tests::nvme
13 changes: 13 additions & 0 deletions tests/tests_fatals_cache_volume_scsi_generated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
# This file was generated by generate_tests.py
- hosts: all
tags:
- tests::scsi
tasks:
- name: set disk interface for test
set_fact:
storage_test_use_interface: "scsi"

- import_playbook: tests_fatals_cache_volume.yml
tags:
- tests::scsi