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

AAP-13847: Remove community.general.random_string dependencies #244

Merged
merged 4 commits into from
Jul 7, 2023
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- Remove dependencies on community.general.random_string
4 changes: 2 additions & 2 deletions tests/utils/playbooks/edge-installer-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
tasks:
- name: Init config - phase 1
ansible.builtin.set_fact: # noqa: run-once[task]
image_name: "image-test-{{ query('community.general.random_string', upper=false, special=false, length=16)[0] }}"
image_name: "image-test-{{ lookup('ansible.builtin.password', '/dev/null', chars='ascii_lowercase', length=16) }}"
libvirt_directory: "/var/lib/libvirt"
builder_compose_type: edge-installer
run_once: true
Expand All @@ -25,7 +25,7 @@
base_image_name: "{{ image_name }}_{{ builder_compose_type }}.iso"
base_image_url: "http://osbuild_builder/{{ image_name }}/images/0.0.1/{{ image_name }}_{{ builder_compose_type }}.iso"

vm_name: "vm-test-{{ query('community.general.random_string', upper=false, special=false, length=16)[0] }}"
vm_name: "vm-test-{{ lookup('ansible.builtin.password', '/dev/null', chars='ascii_lowercase', length=16) }}"
vm_vcpus: 2
vm_ram_mb: 2048
vm_disk: 20
Expand Down
4 changes: 4 additions & 0 deletions tests/utils/playbooks/tasks/cleanup-test-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
community.libvirt.virt: # noqa only-builtins
command: "destroy"
name: "{{ vm_name }}"
register: virt_destroy_results
changed_when: "virt_destroy_results.rc != 0"
failed_when: false

- name: Delete VM
community.libvirt.virt: # noqa only-builtins
command: "undefine"
name: "{{ vm_name }}"
register: virt_undefine_results
changed_when: "virt_undefine_results.rc != 0"
failed_when: false

- name: Cleanup VM disk file
Expand Down