mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Rename one_image_facts -> one_image_info (#57035)
* Rename one_image_facts -> one_image_info. * Add changelog. * Forgot symlink.
This commit is contained in:
@@ -3,5 +3,5 @@
|
||||
roles:
|
||||
- { role: one_vm, tags: test_one_vm }
|
||||
- { role: one_image, tags: test_one_image }
|
||||
- { role: one_image_facts, tags: test_one_image_facts }
|
||||
- { role: one_image_info, tags: test_one_image_info }
|
||||
- { role: one_service, tags: test_one_service }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
# This is a role for running integration test of the one_image_facts module.
|
||||
# This is a role for running integration test of the one_image_info module.
|
||||
# For this role to be used you need to meet the following prerequisites:
|
||||
# 1. Environment variables ONE_URL, ONE_USERNAME and ONE_PASSWORD
|
||||
# need to be set.
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Fetch all images
|
||||
one_image_facts:
|
||||
one_image_info:
|
||||
register: all_images
|
||||
|
||||
- name: Print all images
|
||||
@@ -8,7 +8,7 @@
|
||||
var: all_images
|
||||
|
||||
- name: Gather facts about an image using a name
|
||||
one_image_facts:
|
||||
one_image_info:
|
||||
name: '{{ one_image_name }}'
|
||||
register: image_with_name
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
- image_with_name.images[0].running_vms == 0
|
||||
|
||||
- name: Gather facts about the image using ID
|
||||
one_image_facts:
|
||||
one_image_info:
|
||||
id: '{{ image_with_name.images[0].id }}'
|
||||
register: image_with_ids
|
||||
|
||||
@@ -36,20 +36,20 @@
|
||||
- image_with_ids.images[0].running_vms == 0
|
||||
|
||||
- name: Try to gather facts about an image using a name and ids
|
||||
one_image_facts:
|
||||
one_image_info:
|
||||
name: '{{ one_image_name }}'
|
||||
id: '{{ image_with_name.images[0].id }}'
|
||||
register: image_name_ids
|
||||
failed_when: not image_name_ids is failed
|
||||
|
||||
- name: Try to fetch non-existent image by name
|
||||
one_image_facts:
|
||||
one_image_info:
|
||||
name: non-existent-vm-{{ ansible_date_time.iso8601_basic_short }}
|
||||
register: image_missing
|
||||
failed_when: not image_missing is failed
|
||||
|
||||
- name: Try to gather facts about non-existent images by regex
|
||||
one_image_facts:
|
||||
one_image_info:
|
||||
name: ~non-existent-vm-{{ ansible_date_time.iso8601_basic_short }}-*
|
||||
register: images_with_regex
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
- images_with_regex.images|length == 0
|
||||
|
||||
- name: Try to fetch non-existent image by id
|
||||
one_image_facts:
|
||||
one_image_info:
|
||||
id: -999
|
||||
register: image_missing
|
||||
failed_when: not image_missing is failed
|
||||
@@ -79,7 +79,7 @@
|
||||
new_name: '{{ one_image_name }}-clone-2'
|
||||
|
||||
- name: Fetch all images whose name matches regex
|
||||
one_image_facts:
|
||||
one_image_info:
|
||||
name: '~{{ one_image_name }}-clone-[12]$'
|
||||
register: cloned_instances
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
msg: "There should be 2 cloned instances"
|
||||
|
||||
- name: Gather facts about all images using IDs
|
||||
one_image_facts:
|
||||
one_image_info:
|
||||
ids:
|
||||
- '{{ cloned_instances.images[0].id }}'
|
||||
- '{{ cloned_instances.images[1].id }}'
|
||||
@@ -115,7 +115,7 @@
|
||||
new_name: '{{ one_image_name }}-CLONE-2'
|
||||
|
||||
- name: Fetch all images whose name matches regex
|
||||
one_image_facts:
|
||||
one_image_info:
|
||||
name: '~{{ one_image_name }}-clone-[12]$'
|
||||
register: cloned_instances
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
msg: "There should be 1 cloned instance"
|
||||
|
||||
- name: Fetch all images whose name matches regex ignoring cases
|
||||
one_image_facts:
|
||||
one_image_info:
|
||||
name: '~*{{ one_image_name }}-clone-[12]$'
|
||||
register: cloned_instances_case_insensitive
|
||||
|
||||
Reference in New Issue
Block a user