This commit is contained in:
parent
f5309db299
commit
44fe3fc6b0
@ -20,6 +20,8 @@
|
||||
project_id: "{{ lookup('env', 'GCE_PROJECT_ID') }}"
|
||||
register: server
|
||||
with_items: "{{ molecule_yml.platforms }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }} - {{ item.machine_type }}"
|
||||
async: 7200
|
||||
poll: 0
|
||||
|
||||
@ -30,6 +32,8 @@
|
||||
until: gce_jobs.finished
|
||||
retries: 300
|
||||
with_items: "{{ server.results }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }} - {{ item.machine_type }}"
|
||||
|
||||
# Mandatory configuration for Molecule to function.
|
||||
|
||||
@ -42,6 +46,8 @@
|
||||
'port': "{{ ssh_port }}",
|
||||
'identity_file': "{{ ssh_identity_file }}", }
|
||||
with_items: "{{ gce_jobs.results }}"
|
||||
loop_control:
|
||||
label: "{{ item.instance_data[0].name }} - {{ item.instance_data[0].machine_type }}"
|
||||
register: instance_config_dict
|
||||
when: server.changed | bool
|
||||
|
||||
@ -63,3 +69,5 @@
|
||||
search_regex: SSH
|
||||
delay: 10
|
||||
with_items: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}"
|
||||
loop_control:
|
||||
label: "{{ item.instance }}"
|
||||
|
@ -2,6 +2,9 @@ import os
|
||||
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
import warnings
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user