Skip to content

Commit cf52c11

Browse files
GerbenWelterFred-sun
authored andcommitted
Add support for managing the 'Firewall and virtual networks' settings of a Storage Account. (#108)
* Add support for managing the 'Firewall and virtual networks' settings of a Storage Account. Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com> Update azure_rm_publicipaddress add test sample codebase cleanup: update format (#131) * Update format refine azure devops pipeline (#138) * refine azure devops pipeline enable single module test (#144) * enable single module test bug fixing in azure_rm_aks module(#170) * bug fixing in azure_rm_aks module For Test( 2.9 to 2.10) (#140) * adding more testing dimensions Add FileEndpoint to azure_rm_storageaccount_info (#102) * Add FileEndpoint to azure_rm_storageaccount_info Use hasattr instead of dir (#75) Add ephemeral OS disk for azure_rm_virtualmachine (#124) * Add ephemeral OS disk support for azure_rm_virtualmachine Add ephemeral OS disk for azure_rm_virtualmachinescaleset (#128) * Add ephemeral OS disk support for azure_rm_virtualmachinescaleset Change network_client api_version to match latest default api_version (#157) * #Fixes 156 Change network_client api_version to match latest default api_version * #Fixes 156 Update azure-mgmt-network to 10.2.0 Update 'latest' version listing and default version for Network Client to 2018-08-01 Add ability to remove all Subnet Service Endpoints when supplying an empty list. (#148) New azure_rm_privatednszone module with tests (#122) * New azure_rm_privatednszone module with tests Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com> Co-authored-by: Fred-sun <xiuxi.sun@qq.com> Add new azure active directory related modules (#179) * add ad related modules * release v0.2.0 preparation and minor ad module bug fixing fixing sanity testing errors in ad related modules (#182) * disable ad relate module test * fixing sanity testing errors in ad related modules Fixing issues in azure_rm_deployment_info.py (#180) - Fixing getting the template_link when it does not exist. - Feature: Return the correlation_id Co-authored-by: Steve Kieu <steve.kieu@xvt.com.au> azure_rm_virtualmachine: Protect against no diskSizeGB (#185) Disks `diskSizeGB` is not reported if the Virtual Machine is deallocated. Trying to fetch it is causing a `KeyError`. This guards against that KeyError and then nulls out the key so it isn't set incorrectly in the update call. Fix wrong module deprecate statement format (#176) * fix wrong module deprecate statement format update doc add batch upload feature in azure_rm_storageblob (#203) Co-authored-by: haiyuazhang <haiyuan.zhang1982@gmaile.com> fixing status code issue in azure_rm_deployment (#204) Co-authored-by: haiyuazhang <haiyuan.zhang1982@gmaile.com> fixing update check bug in azure_rm_adserviceprincipal (#205) Bump version to v0.3.0 update doc change service_url to service_uri (#212) Storageaccount tlsversion (#207) * add support for minimum_tls_version fix(vm): fix boot diagnistics option "no" caused an error (#200) Fix the issue #158 (#214) * fix issue #158 and add tests azure_rm_appgateway.py: Support Version 2 SKUs (#198) fix sanity test issues (#223) Bump version to v0.4.0 lift v0.4.0 to v1.0.0 update new pr-pipeline (#229) Add execution environment metadata (#220) Storage account allow blob public access parameter (#219) * Storage account allow blob public access parameter * Change name of test to match correct attribute. Update azure_rm_virtualmachine boot_diagnostics resource group config… (#208) * Update azure_rm_virtualmachine boot_diagnostics resource group configuration Update azure_rm_storageaccount.py file (#233) * Uneatable parameters do not need to set default values fix the problem of disk lun self-increment (#237) Fixing rule_type reference (#99) Reference to ev instead of item is preventing the expected rule_type values from functioning Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com> add load_balancer_sku option for aks (#199) * added load_balancer_sku option for aks Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com> Improve OS detection when VM has no osProfile (#197) We have VM without OS profile (checked on https://resources.azure.com/) and they appear as "unknown" os :-/ This appear to be a known issue: https://support.microsoft.com/en-ph/help/4018140/computer-names-of-specialized-virtual-machines-are-missing-or-blank-in Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com> Co-authored-by: haiyuan_zhang <haiyuan.zhang1982@gmail.com> Add IPv6 address for azure_rm_subnet (#240) * Add IPv6 address for azure_rm_subnet Get address_prefixes info from virtualnetwork (#239) * Add new parameter for get subnet IPv6 info Support azure cli credentials with multiple `subscription_id`s (#195) * feat: Support azure cli credentials with multiple `subscription_id`s If the `subscription_id` is specified as module parameter or in the environment then try to find that subscription in either the MSI (existing) or CLI credentials (new). This patch brings those two scenarios in line. * docs: Improve documentation on auth_source * refactor: Move defaults up to class Just trying to make the `__init__` fn a bit slimmer and easier to reason about. * refactor: Use python kwargs instead of passing dict This is an isomorphic change, just using python syntax to accomplish the exact same thing. * refactor: Use ansible builtin `env_fallback` for `auth_source` Ansible modules have a pattern for looking up a module parameter in the environment with precedence of explicit param -> env -> default. Use this pattern to simplify our code here. This shouldn't change any behavior of `auth_source`, just using standard ansible patterns to accomplish it. * style: Split long line No semantic change, just wrapping a long line to be a bit more readable. * refactor: helper fun _get_env Somewhat frequently there is a lookup in the environment for the key that matches a module parameter. This simple helper just encapsulates that to make it a bit easier elsewhere-- lookup the same key in params, credentials, env * fix: typo in log message Co-authored-by: Justin Ossevoort <justin.ossevoort@tesorion.nl> Add 10.3 version for azure_rm_mariadbserver module (#244) * add new version for azure_rm_mariadbserver Update azure_rm_storageaccount yaml (#226) * update azure_rm_storageaccount test * update pipeline file
1 parent 5f7c079 commit cf52c11

243 files changed

Lines changed: 5027 additions & 797 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,47 @@
11
# Change Log
2+
## v1.0.0 (2020-08-12)
3+
4+
### FEATURE ENHANCEMENT
5+
- azure_rm_appgateway: support version 2 SKUS ([#198](https://github.com/ansible-collections/azure/pull/198))
6+
- azure_rm_storageaccount: support minimum tls version ([#207](https://github.com/ansible-collections/azure/pull/207))
7+
8+
### BUG FIXING
9+
- azure_rm_roledefinition: fails when `description` is set ([#214](https://github.com/ansible-collections/azure/pull/214))
10+
- azure_rm_virtualmachine: boot diagnostics related error ([#200](https://github.com/ansible-collections/azure/pull/200))
11+
12+
13+
## v0.3.0 (2020-07-24)
14+
15+
### FEATURE ENHANCEMENT
16+
- azure_rm_storageblob: add batch upload feature ([#203](https://github.com/ansible-collections/azure/pull/203))
17+
18+
### BUG FIXING
19+
- azure_rm_deployment_info: getting the template_link when it does not exist ([#180](https://github.com/ansible-collections/azure/pull/180))
20+
- azure_rm_virtualmachine: protect against no diskSizeGB ([#185](https://github.com/ansible-collections/azure/pull/185))
21+
- azure_rm_deployment: misleading status code in module failure message ([#204](https://github.com/ansible-collections/azure/pull/204))
22+
- azure_rm_adserviceprincipal: invalid update check logic ([#205](https://github.com/ansible-collections/azure/pull/205))
23+
24+
25+
## v0.2.0 (2020-07-03)
26+
27+
### NEW MODULES
28+
- azure_rm_privatezone module ([#122](https://github.com/ansible-collections/azure/pull/122))
29+
- azure_rm_adserviceprincipal module ([#179](https://github.com/ansible-collections/azure/pull/179))
30+
- azure_rm_adserviceprincipal_info module ([#179](https://github.com/ansible-collections/azure/pull/179))
31+
- azure_rm_adpassword module ([#179](https://github.com/ansible-collections/azure/pull/179))
32+
- azure_rm_adpassword_info module ([#179](https://github.com/ansible-collections/azure/pull/179))
33+
34+
### FEATURE ENHANCEMENT
35+
- add ability to remove all subnet service endpoints ([#148](https://github.com/ansible-collections/azure/pull/148))
36+
- update network client api version ([#157](https://github.com/ansible-collections/azure/pull/157))
37+
- add ephemeral os disk support for azure_rm_virualmachinescaleset ([#128](https://github.com/ansible-collections/azure/pull/128))
38+
- add ephemeral os disk support for azure_rm_virtualmachine ([#124](https://github.com/ansible-collections/azure/pull/124))
39+
- add FileEndpoint to azure_rm_storageaccount_info ([#102](https://github.com/ansible-collections/azure/pull/102))
40+
- add support for managing the 'Firewall and virtual networks' settings in azure_rm_storageaccount ([#108](https://github.com/ansible-collections/azure/pull/108))
41+
42+
### BUG FIXING
43+
- bug fixing in azure_rm_aks ([#170](https://github.com/ansible-collections/azure/pull/170))
44+
- migrate missing doc_fragments that went missing ([#115](https://github.com/ansible-collections/azure/pull/115))
245

346
## v0.1.3 (2020-05-13)
447

galaxy.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace: azure
99
name: azcollection
1010

1111
# The version of the collection. Must be compatible with semantic versioning
12-
version: 0.1.3
12+
version: 1.0.0
1313

1414
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
1515
readme: README.md
@@ -18,7 +18,6 @@ readme: README.md
1818
# @nicks:irc/im.site#channel'
1919
authors:
2020
- Microsoft <haiyzhan@microsoft.com>
21-
- Microsoft <jieshe@microsoft.com>
2221

2322

2423
### OPTIONAL but strongly recommended

meta/execution-environment.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dependencies:
2+
python: requirements-azure.txt
3+
version: 1

plugins/doc_fragments/azure.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# Copyright: (c) 2016 Chris Houseknecht, <house@redhat.com>
55
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
66

7+
from __future__ import absolute_import, division, print_function
8+
__metaclass__ = type
9+
710

811
class ModuleDocFragment(object):
912

@@ -48,47 +51,50 @@ class ModuleDocFragment(object):
4851
the C(AZURE_CLOUD_ENVIRONMENT) environment variable.
4952
type: str
5053
default: AzureCloud
51-
version_added: '2.4'
54+
version_added: '0.0.1'
5255
adfs_authority_url:
5356
description:
5457
- Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority.
5558
type: str
56-
version_added: '2.6'
59+
version_added: '0.0.1'
5760
cert_validation_mode:
5861
description:
5962
- Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but
6063
when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing C(ignore). Can also be
6164
set via credential file profile or the C(AZURE_CERT_VALIDATION) environment variable.
6265
type: str
6366
choices: [ ignore, validate ]
64-
version_added: '2.5'
67+
version_added: '0.0.1'
6568
auth_source:
6669
description:
6770
- Controls the source of the credentials to use for authentication.
68-
- If not specified, ANSIBLE_AZURE_AUTH_SOURCE environment variable will be used and default to C(auto) if variable is not defined.
69-
- C(auto) will follow the default precedence of module parameters -> environment variables -> default profile in credential file
70-
C(~/.azure/credentials).
71-
- When set to C(cli), the credentials will be sources from the default Azure CLI profile.
7271
- Can also be set via the C(ANSIBLE_AZURE_AUTH_SOURCE) environment variable.
72+
- When set to C(auto) (the default) the precedence is module parameters -> C(env) -> C(credential_file) -> C(cli).
73+
- When set to C(env), the credentials will be read from the environment variables
74+
- When set to C(credential_file), it will read the profile from C(~/.azure/credentials).
75+
- When set to C(cli), the credentials will be sources from the Azure CLI profile. C(subscription_id) or the environment variable
76+
C(AZURE_SUBSCRIPTION_ID) can be used to identify the subscription ID if more than one is present otherwise the default
77+
az cli subscription is used.
7378
- When set to C(msi), the host machine must be an azure resource with an enabled MSI extension. C(subscription_id) or the
7479
environment variable C(AZURE_SUBSCRIPTION_ID) can be used to identify the subscription ID if the resource is granted
7580
access to more than one subscription, otherwise the first subscription is chosen.
7681
- The C(msi) was added in Ansible 2.6.
7782
type: str
83+
default: auto
7884
choices:
7985
- auto
8086
- cli
8187
- credential_file
8288
- env
8389
- msi
84-
version_added: '2.5'
90+
version_added: '0.0.1'
8591
api_profile:
8692
description:
8793
- Selects an API profile to use when communicating with Azure services. Default value of C(latest) is appropriate for public clouds;
8894
future values will allow use with Azure Stack.
8995
type: str
9096
default: latest
91-
version_added: '2.5'
97+
version_added: '0.0.1'
9298
requirements:
9399
- python >= 2.7
94100
- azure >= 2.0.0

plugins/doc_fragments/azure_tags.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# Copyright: (c) 2016, Chris Houseknecht, <house@redhat.com>
55
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
66

7+
from __future__ import absolute_import, division, print_function
8+
__metaclass__ = type
9+
710

811
class ModuleDocFragment(object):
912

plugins/inventory/azure_rm.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,12 @@ def hostvars(self):
532532
system = 'linux'
533533
if 'windowsConfiguration' in self._vm_model['properties']['osProfile']:
534534
system = 'windows'
535+
else:
536+
osType = self._vm_model['properties']['storageProfile']['osDisk']['osType']
537+
if osType == 'Linux':
538+
system = 'linux'
539+
if osType == 'Windows':
540+
system = 'windows'
535541

536542
new_hostvars = dict(
537543
public_ipv4_addresses=[],

0 commit comments

Comments
 (0)