mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
adding new container instance options (#54072)
This commit is contained in:
@@ -79,7 +79,9 @@
|
||||
name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}sec"
|
||||
os_type: linux
|
||||
ip_address: public
|
||||
dns_name_label: mydnslabel{{ resource_group | hash('md5') | truncate(7, True, '') }}
|
||||
location: eastus
|
||||
restart_policy: on_failure
|
||||
ports:
|
||||
- 80
|
||||
containers:
|
||||
@@ -89,6 +91,12 @@
|
||||
ports:
|
||||
- 80
|
||||
- 81
|
||||
commands:
|
||||
- echo abc
|
||||
- echo cdf
|
||||
environment_variables:
|
||||
- name: myvar
|
||||
value: myvarvalue
|
||||
register: output
|
||||
|
||||
- name: Gather facts for single Container Instance
|
||||
@@ -97,6 +105,9 @@
|
||||
name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}sec"
|
||||
register: output
|
||||
|
||||
- debug:
|
||||
var: output
|
||||
|
||||
- name: Assert that facts are returned
|
||||
assert:
|
||||
that:
|
||||
@@ -108,6 +119,9 @@
|
||||
- output.containerinstances[0]['ip_address'] != None
|
||||
- output.containerinstances[0]['ports'] != None
|
||||
- output.containerinstances[0]['containers'] != None
|
||||
- output.containerinstances[0]['containers'][0]['commands'] | length == 2
|
||||
- output.containerinstances[0]['containers'][0]['environment_variables'] | length == 1
|
||||
- output.containerinstances[0]['restart_policy'] == 'on_failure'
|
||||
|
||||
- name: Gather facts for all Container Instances in the resource group
|
||||
azure_rm_containerinstance_facts:
|
||||
|
||||
@@ -7,7 +7,7 @@ azure-mgmt-authorization==0.51.1
|
||||
azure-mgmt-batch==4.1.0
|
||||
azure-mgmt-cdn==3.0.0
|
||||
azure-mgmt-compute==4.4.0
|
||||
azure-mgmt-containerinstance==0.4.0
|
||||
azure-mgmt-containerinstance==1.4.0
|
||||
azure-mgmt-containerregistry==2.0.0
|
||||
azure-mgmt-containerservice==4.4.0
|
||||
azure-mgmt-dns==2.1.0
|
||||
|
||||
Reference in New Issue
Block a user