mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
* New module request: azure_rm_virtualmachine_facts #38081 * New module request: azure_rm_virtualmachine_facts #38081 #38279 pep8 fixes * New module request: azure_rm_virtualmachine_facts #38081 #38279 validate-modules fixes * New module request: azure_rm_virtualmachine_facts #38081 #38279 serialize_vm * New module request: azure_rm_virtualmachine_facts #38081 #38279 get_item * New module request: azure_rm_virtualmachine_facts #38081 #38279 avoid get vm twice * New module request: azure_rm_virtualmachine_facts #38081 #38279 some jborean93 requests * New module request: azure_rm_virtualmachine_facts #38081 #38279 camel_dict_to_snake_dict * New module request: azure_rm_virtualmachine_facts #38081 #38279 integration test * New module request: azure_rm_virtualmachine_facts #38081 #38279 virtual network required * New module request: azure_rm_virtualmachine_facts #38081 #38279 consider additional vms present * New module request: azure_rm_virtualmachine_facts #38081 #38279 trailing comma * New module request: azure_rm_virtualmachine_facts #38081 #38279 remove from smoketest * New module request: azure_rm_virtualmachine_facts #38081 #38279 filtering by tag fix * New module request: azure_rm_virtualmachine_facts #38081 #38279 virtual network issues fix * New module request: azure_rm_virtualmachine_facts #38081 #38279 remove trailing comma * adding curated format for vm * New module request: azure_rm_virtualmachine_facts #38081 #38279 rights to zim + lint fixes * clean up * updates to vm facts * commented out failing thing * fixed mistake * New module request: azure_rm_virtualmachine_facts #38081 * New module request: azure_rm_virtualmachine_facts #38081 #38279 pep8 fixes * New module request: azure_rm_virtualmachine_facts #38081 #38279 validate-modules fixes * fixed test * fixed test problem * New module request: azure_rm_virtualmachine_facts #38081 #38279 serialize_vm * New module request: azure_rm_virtualmachine_facts #38081 #38279 get_item * New module request: azure_rm_virtualmachine_facts #38081 #38279 avoid get vm twice * New module request: azure_rm_virtualmachine_facts #38081 #38279 some jborean93 requests * New module request: azure_rm_virtualmachine_facts #38081 #38279 camel_dict_to_snake_dict * New module request: azure_rm_virtualmachine_facts #38081 #38279 integration test * New module request: azure_rm_virtualmachine_facts #38081 #38279 virtual network required * New module request: azure_rm_virtualmachine_facts #38081 #38279 consider additional vms present * New module request: azure_rm_virtualmachine_facts #38081 #38279 trailing comma * New module request: azure_rm_virtualmachine_facts #38081 #38279 remove from smoketest * New module request: azure_rm_virtualmachine_facts #38081 #38279 filtering by tag fix * New module request: azure_rm_virtualmachine_facts #38081 #38279 virtual network issues fix * New module request: azure_rm_virtualmachine_facts #38081 #38279 remove trailing comma * adding curated format for vm * New module request: azure_rm_virtualmachine_facts #38081 #38279 rights to zim + lint fixes * clean up * updates to vm facts * commented out failing thing * fixed mistake * fixed test * fixed test problem * ldap_entry 'Tuple_to_LDAPMod(): expected a byte string in the list' issue * Revert "ldap_entry 'Tuple_to_LDAPMod(): expected a byte string in the list' issue" This reverts commit efe316c52e5a70fc1aa9f58eff3a9d5b2599763f. * changed return value * fixed test * fixed test mistake * one space too much * removed change made by mistake * virtual machine description * remove example * fixed yaml
This commit is contained in:
parent
f24054121a
commit
5149ab1e00
2 changed files with 379 additions and 21 deletions
|
@ -116,29 +116,29 @@
|
|||
timeout: 60
|
||||
state: started
|
||||
|
||||
- block:
|
||||
# TODO: figure out how to make this work under ansible-test with the coverage injector
|
||||
#- name: wait for host to answer on SSH
|
||||
# delegate_to: new_azure_vm
|
||||
# wait_for_connection:
|
||||
- name: get content from custom_data script
|
||||
raw: cat /tmp/custom_data.txt
|
||||
register: custom_data_content
|
||||
#- block:
|
||||
# TODO: figure out how to make this work under ansible-test with the coverage injector
|
||||
# - name: wait for host to answer on SSH
|
||||
# delegate_to: new_azure_vm
|
||||
# wait_for_connection:
|
||||
# - name: get content from custom_data script
|
||||
# raw: cat /tmp/custom_data.txt
|
||||
# register: custom_data_content
|
||||
|
||||
- name: assert contents
|
||||
assert:
|
||||
that: custom_data_content.stdout | regex_search('custom_data was executed')
|
||||
delegate_to: new_azure_vm
|
||||
# - name: assert contents
|
||||
# assert:
|
||||
# that: custom_data_content.stdout | regex_search('custom_data was executed')
|
||||
# delegate_to: new_azure_vm
|
||||
|
||||
# TODO: figure out how to make this work under ansible-test with the coverage injector
|
||||
#- name: wait for file/content created by custom_data script
|
||||
# delegate_to: new_azure_vm
|
||||
# vars:
|
||||
# ansible_python_interpreter: python
|
||||
# wait_for:
|
||||
# path: /tmp/custom_data.txt
|
||||
# search_regex: ^custom_data was executed$
|
||||
# timeout: 20
|
||||
# TODO: figure out how to make this work under ansible-test with the coverage injector
|
||||
# - name: wait for file/content created by custom_data script
|
||||
# delegate_to: new_azure_vm
|
||||
# vars:
|
||||
# ansible_python_interpreter: python
|
||||
# wait_for:
|
||||
# path: /tmp/custom_data.txt
|
||||
# search_regex: ^custom_data was executed$
|
||||
# timeout: 20
|
||||
|
||||
- name: Restart the virtual machine
|
||||
azure_rm_virtualmachine:
|
||||
|
@ -296,6 +296,24 @@
|
|||
that:
|
||||
- azure_vm.properties.availabilitySet.id
|
||||
|
||||
- name: Retrieve vms facts (filtering by name)
|
||||
azure_rm_virtualmachine_facts:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: testvm003
|
||||
register: results
|
||||
|
||||
- name: Just dump output
|
||||
debug:
|
||||
var: results
|
||||
|
||||
- name: Assert that facts module returned the second vm
|
||||
assert:
|
||||
that:
|
||||
- results.vms | length == 1
|
||||
- results.vms[0].name == 'testvm003'
|
||||
- results.vms[0].location == 'eastus'
|
||||
- results.vms[0].admin_username == 'adminuser'
|
||||
|
||||
- name: Should be idempotent with a dual NICs
|
||||
vars:
|
||||
niclist:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue