plugin: gcp_computeprojects:- <project-name>filters:- disks.licenses:ubuntuauth_kind: serviceaccountservice_account_file: ~/google_cloud/service_account/key/<filename>.json
gcloud compute instances list --filter="(disks.licenses:ubuntu)" --format=json
ansible-inventory -i <filename>.gcp.yml --list
[WARNING]: * Failed to parse /Users/username/.ansible/inventory/<filename>.gcp.yml with yaml plugin: Plugin configuration YAML file, not YAML inventory
[WARNING]: * Failed to parse /Users/username/.ansible/inventory/<filename>.gcp.yml with ini plugin:
/Users/username/.ansible/inventory/<filename>.gcp.yml:1: Expected key=value host variable assignment, got: gcp_compute
[WARNING]: * Failed to parse /Users/username/.ansible/inventory/<filename>.gcp.yml with auto plugin: [{'domain': 'global', 'reason': 'invalid',
'message': "Invalid value for field 'filter': 'disks.licenses:ubuntu'. Invalid list filter expression."}]
[WARNING]: Unable to parse /Users/username/.ansible/inventory/<filename>.gcp.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
{
"_meta": {
"hostvars": {}
},
"all": {
"children": [
"ungrouped"
]
},
"ungrouped": {}
}
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4a1f507c-68ae-4914-912f-7d46e42fff4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
disks[].licenses[]:ubuntu
disks.licenses=ubuntu
disks[].licenses[]=ubuntu