-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azure_rm_manageddisk_info managed_by not working #679
Comments
Hi @DII-dsward, Edit: Disregard, this doesn't give as much info as I thought. Cheers! |
I have checked azure_rm_virtualmachine_info, but it does not show the name of the disk. I'm not seeing how to use azure_rm_manageddisk to tag it if i cannot get the name of these disks. ---
- name: Get managed disks
azure_rm_virtualmachine_info:
resource_group: "{{ resource_group }}"
name: "{{ inventory_hostname_short }}"
register: vminfo
- debug:
var: vminfo "data_disks": [
{
"lun": 0,
"disk_size_gb": 10,
"managed_disk_type": "Standard_LRS",
"caching": "None"
} |
@kinect1things you're absolutely right, my bad! However, jumping back to the original post, filtering This successfully lists the attached disks in my test cases: - name: Get Disks associated with my VM
azure.azcollection.azure_rm_manageddisk_info:
managed_by: /subscriptions/XXXXXX-XXX-XXXX-XXX-XXXXXXXXXX/resourceGroups/RGNAME-eastus2/providers/Microsoft.Compute/virtualMachines/myVM @DII-dsward can you confirm which version of the azure collection you are using? I suspect you are using an older version. Support for this was merged in October 2020 |
This is the playbook i'm using ---
- hosts: vms
connection: local
collections:
- azure.azcollection
tasks:
- debug:
var: id
- name: Get Disks managed by VM
azure_rm_manageddisk_info:
managed_by: "{{ id }}"
register: vmdisks
- debug:
var: vmdisks The Output looks like this
|
@DII-dsward what does |
Here is the output and ansible version.
|
@DII-dsward you're on an older version of ansible, so I think If you run
Let me know what you get, but most likely your azcollection is outdated and you will need to install a newer version. Thanks! |
@nbr23 According to your error log, you are using the old ansible-collections version, please upgrade the ansible-collection and try again. Thank you very much!
|
@Fred-sun correct, I was reproducing the issue @DII-dsward is having. I agree this looks like they need to upgrade their collection :) |
I have confirmed I am using azure.azcollection 1.10.0 by looking at the collection MANIFEST.json
$ cd /var/lib/awx/projects/.__awx_cache/_26__repo_of_doom/#####/requirements_collections/ansible_collections/ansible_collections/azure/azcollection
$ cat MANIFEST.json | grep version
"version": "1.10.0",
|
Due to the dynamic inventory script not populating the names of the managed disks attached to a VM, I am trying to pull the names of the managed disks attached to a 'vm fqid'.
The error returned it...
fatal: [DVMANFSTEST01.dii.local]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (azure_rm_manageddisk_info) module: managed_by Supported parameters include: ad_user, adfs_authority_url, api_profile, append_tags, auth_source, cert_validation_mode, client_id, cloud_environment, name, password, profile, resource_group, secret, subscription_id, tags, tenant"}
Following this documentation
https://github.com/ansible-collections/azure/blob/dev/plugins/modules/azure_rm_manageddisk_info.py
SUMMARY
This playbook is returning an error saying managed_by is not a valid parameter
ISSUE TYPE
COMPONENT NAME
azure.azcollection.azure_rm_manageddisk_info
ANSIBLE VERSION
ansible 2.9
OS / ENVIRONMENT
Ansible Tower 3.8.4
The text was updated successfully, but these errors were encountered: