mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-23 04:24:00 -07:00
Add Azure support to ansible-test. (#28092)
* Initial Azure cloud testing support. * Add missing Azure requirements. * Fix test handling of setup and requirements. * Update Azure cloud plugin. * Add setup_azure role for integration tests. * Update minimal Azure integration test sample.
This commit is contained in:
parent
c27ebfc368
commit
caf8bbf3bd
11 changed files with 261 additions and 8 deletions
31
test/integration/cloud-config-azure.yml.template
Normal file
31
test/integration/cloud-config-azure.yml.template
Normal file
|
@ -0,0 +1,31 @@
|
|||
# This is the configuration template for ansible-test Azure integration tests.
|
||||
#
|
||||
# You do not need this template if you are:
|
||||
#
|
||||
# 1) Running integration tests without using ansible-test.
|
||||
# 2) Using the automatically provisioned Azure credentials in ansible-test.
|
||||
#
|
||||
# If you do not want to use the automatically provisioned temporary Azure credentials,
|
||||
# fill in the values below and save this file without the .template extension.
|
||||
# This will cause ansible-test to use the given configuration instead of temporary credentials.
|
||||
#
|
||||
# NOTE: Automatic provisioning of Azure credentials requires one of:
|
||||
# 1) ansible-core-ci API key in ~/.ansible-core-ci.key
|
||||
# 2) Sherlock URL (including API key) in ~/.ansible-sherlock-ci.cfg
|
||||
|
||||
# Provide either Service Principal or Active Directory credentials below.
|
||||
|
||||
# Service Principal
|
||||
AZURE_CLIENT_ID=
|
||||
AZURE_SECRET=
|
||||
AZURE_SUBSCRIPTION_ID=
|
||||
AZURE_TENANT=
|
||||
|
||||
# Active Directory
|
||||
AZURE_AD_USER=
|
||||
AZURE_PASSWORD=
|
||||
AZURE_SUBSCRIPTION_ID=
|
||||
|
||||
# Resource Groups
|
||||
RESOURCE_GROUP=
|
||||
RESOURCE_GROUP_SECONDARY=
|
|
@ -50,3 +50,6 @@ overridden_in_parent=2000
|
|||
|
||||
[amazon]
|
||||
localhost ansible_ssh_host=127.0.0.1 ansible_connection=local
|
||||
|
||||
[azure]
|
||||
localhost ansible_ssh_host=127.0.0.1 ansible_connection=local
|
||||
|
|
2
test/integration/targets/azure_rm_virtualnetwork/aliases
Normal file
2
test/integration/targets/azure_rm_virtualnetwork/aliases
Normal file
|
@ -0,0 +1,2 @@
|
|||
cloud/azure
|
||||
destructive
|
|
@ -0,0 +1,2 @@
|
|||
dependencies:
|
||||
- setup_azure
|
|
@ -0,0 +1,7 @@
|
|||
- block:
|
||||
- name: create a virtual network
|
||||
azure_rm_virtualnetwork:
|
||||
resource_group: '{{ resource_group }}'
|
||||
name: test
|
||||
address_prefixes_cidr:
|
||||
- "10.1.0.0/16"
|
2
test/integration/targets/setup_azure/tasks/main.yml
Normal file
2
test/integration/targets/setup_azure/tasks/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
- pip:
|
||||
requirements: '{{ role_path }}/../../../../packaging/requirements/requirements-azure.txt'
|
Loading…
Add table
Add a link
Reference in a new issue