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