generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Summary
I have been using a dynamic inventory file to query DigitalOcean and collect my available droplets sorted by tag. Here is the file I have been using:
---
plugin: digitalocean.cloud.droplets
attributes:
- tags
- region
- networks
- status
keyed_groups:
- key: region.slug
prefix: region
separator: "_"
- key: do_tags
prefix: ""
separator: ""
compose:
ansible_host: networks.v4 | selectattr("type", "eq", "public") | map(attribute="ip_address") | first
class: size.description | lower
distro: image.distribution | lower
I upgraded this last year from the old community DigitalOcean collection to the digitalocean.cloud.droplets collection. It has been working great, until today. Now I receive this error:
[WARNING]: Failed to parse inventory with 'yaml' plugin: Plugin configuration YAML file, not YAML inventory
Failed to parse inventory with 'yaml' plugin.
<<< caused by >>>
Plugin configuration YAML file, not YAML inventory
Origin: <inventory plugin 'yaml' with source '/Users/sbowman/Projects/dmk/deploy/digitalocean.yml'>
[WARNING]: Failed to parse inventory with 'ansible_collections.digitalocean.cloud.plugins.inventory.droplets' plugin: type object 'DigitalOceanReqs' has no attribute 'Client'
Failed to parse inventory with 'ansible_collections.digitalocean.cloud.plugins.inventory.droplets' plugin.
<<< caused by >>>
type object 'DigitalOceanReqs' has no attribute 'Client'
Origin: <inventory plugin 'ansible_collections.digitalocean.cloud.plugins.inventory.droplets' with source '/Users/sbowman/Projects/dmk/deploy/digitalocean.yml'>
[WARNING]: Unable to parse /Users/sbowman/Projects/dmk/deploy/digitalocean.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
I did update Ansible this weekend, so I tried rolling that back to a previous version, but I get the same error. I also tried using an older version of the digitalocean.cloud plugin, but same results. And I've tried using a new API key, but same.
Issue Type
Bug Report
Component Name
droplet
Ansible Version
$ ansible --version
ansible [core 2.20.3]
config file = /Users/sbowman/Projects/dmk/deploy/ansible.cfg
configured module search path = ['/Users/sbowman/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/sbowman/Projects/dmk/deploy/ansible-venv/lib/python3.14/site-packages/ansible
ansible collection location = /Users/sbowman/.ansible/collections:/usr/share/ansible/collections
executable location = /Users/sbowman/Projects/dmk/deploy/ansible-venv/bin/ansible
python version = 3.14.3 (main, Feb 3 2026, 15:32:20) [Clang 17.0.0 (clang-1700.6.3.2)] (/Users/sbowman/Projects/dmk/deploy/ansible-venv/bin/python3.14)
jinja version = 3.1.6
pyyaml version = 6.0.3 (with libyaml v0.2.5)Configuration
$ ansible-config dump --only-changed -t all
ANSIBLE_FORCE_COLOR(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = True
ANSIBLE_NOCOWS(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = True
ANSIBLE_PIPELINING(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = True
CONFIG_FILE() = /Users/sbowman/Projects/dmk/deploy/ansible.cfg
DEFAULT_HOST_LIST(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = ['/Users/sbowman/Projects/dmk/deploy/digitalocean.yml']
DEFAULT_LOCAL_TMP(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = /Users/sbowman/.ansible/tmp/ansible-local-65357u6hj945r
DEFAULT_REMOTE_USER(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = root
DEFAULT_TIMEOUT(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = 60
DEFAULT_VAULT_PASSWORD_FILE(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = /Users/sbowman/Projects/dmk/deploy/.vaultpass
HOST_KEY_CHECKING(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = False
INVENTORY_ENABLED(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = ['yaml', 'digitalocean.cloud.droplets']
RETRY_FILES_SAVE_PATH(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = /Users/sbowman/Projects/dmk/deploy/.ansible
VARIABLE_PLUGINS_ENABLED(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = ['host_group_vars']
GALAXY_SERVERS:
CONNECTION:
==========
local:
_____
pipelining(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = True
paramiko_ssh:
____________
host_key_checking(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = False
remote_user(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = root
timeout(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = 60
psrp:
____
pipelining(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = True
ssh:
___
host_key_checking(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = False
pipelining(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = True
remote_user(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = root
timeout(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = 60
winrm:
_____
pipelining(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = True
SHELL:
=====
sh:
__
remote_tmp(/Users/sbowman/Projects/dmk/deploy/ansible.cfg) = $HOME/.ansible/tmpOS / Environment
macOS Tahoe 26.3
Steps to Reproduce
See above for sample files
$ ansible-inventory -i digitalocean.yml --list -vvvv --yaml --flush-cache
Expected Results
I expected an inventory of my droplets sorted by tag.
Actual Results
[WARNING]: Failed to parse inventory with 'yaml' plugin: Plugin configuration YAML file, not YAML inventory
Failed to parse inventory with 'yaml' plugin.
<<< caused by >>>
Plugin configuration YAML file, not YAML inventory
Origin: <inventory plugin 'yaml' with source '/Users/sbowman/Projects/dmk/deploy/digitalocean.yml'>
[WARNING]: Failed to parse inventory with 'ansible_collections.digitalocean.cloud.plugins.inventory.droplets' plugin: type object 'DigitalOceanReqs' has no attribute 'Client'
Failed to parse inventory with 'ansible_collections.digitalocean.cloud.plugins.inventory.droplets' plugin.
<<< caused by >>>
type object 'DigitalOceanReqs' has no attribute 'Client'
Origin: <inventory plugin 'ansible_collections.digitalocean.cloud.plugins.inventory.droplets' with source '/Users/sbowman/Projects/dmk/deploy/digitalocean.yml'>
[WARNING]: Unable to parse /Users/sbowman/Projects/dmk/deploy/digitalocean.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is availableCode of Conduct
- I agree to follow the Ansible Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels