Skip to content
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

alicloud: About using inventory plugin #232

Closed
lixue323 opened this issue Apr 24, 2020 · 9 comments
Closed

alicloud: About using inventory plugin #232

lixue323 opened this issue Apr 24, 2020 · 9 comments
Labels
bug This issue/PR relates to a bug module module needs_info This issue requires further information. Please answer any outstanding questions

Comments

@lixue323
Copy link
Contributor

lixue323 commented Apr 24, 2020

SUMMARY

I built and installed the collection locally alibaba.alicloud

Directory Structure
alibaba.alicloud

  • plugins
    • inventory
      • alicloud_ecs.py

when I tested my inventory plugin, I got infos below:

[WARNING]: Failed to load inventory plugin, skipping alicloud_ecs
[WARNING]:  * Failed to parse /Users/lixue/Desktop/project3/alibaba.alicloud/plugins/inventory/alicloud.yml with auto
plugin: inventory config '/Users/lixue/Desktop/project3/alibaba.alicloud/plugins/inventory/alicloud.yml' specifies unknown
plugin 'alicloud_ecs'

this is my alicloud.yaml

plugin: alicloud_ecs     # if write `alibaba.alicloud.alicloud_ecs`,  still can't load inventory plugin
regions:
  - cn-beijing

so, I want to known how can i use inventory plugin by collection

ANSIBLE VERSION

2.9

COMPONENT NAME

ali_instance

ISSUE TYPE
  • Bug Report
@ansibullbot

This comment has been minimized.

@ansibullbot

This comment has been minimized.

@ansibullbot ansibullbot added affects_2.10 needs_info This issue requires further information. Please answer any outstanding questions needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly labels Apr 24, 2020
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug cloud module module and removed needs_info This issue requires further information. Please answer any outstanding questions needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly labels Apr 24, 2020
@gundalow
Copy link
Contributor

@lixue323 Hi, thank you for taking the time to raise this bug report.

  1. How exactly did you build the collection, could you please provide the command line you used
  2. Is the source code for the collection available somewhere?

@lixue323
Copy link
Contributor Author

@gundalow
ansible-galaxy collection build
ansible-galaxy collection install alibaba-alicloud-1.0.0.tar.gz --ignore-certs
ansible-inventory -i alicloud.yml --graph

Developed according to this document https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html#id22

There is no problem with the use of modules, but the above problems will occur with the use of plugin inventory

@Akasurde
Copy link
Member

@lixue323 You may want to change this line alibaba/alibaba.alicloud#272 (comment) to read as

    NAME = 'alibaba.alicloud.alicloud_ecs'

and refer this in your inventory in

plugin: alibaba.alicloud.alicloud_ecs
regions:
  - cn-beijing

needs_info

@Akasurde Akasurde changed the title About using inventory plugin alicloud: About using inventory plugin Apr 27, 2020
@ansibullbot ansibullbot added the needs_info This issue requires further information. Please answer any outstanding questions label Apr 27, 2020
@ansibullbot
Copy link
Collaborator

@lixue323 This issue is waiting for your response. Please respond or the issue will be closed.

click here for bot help

@Akasurde
Copy link
Member

Inventory plugin is moved to https://github.com/alibaba/alibaba.alicloud. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module needs_info This issue requires further information. Please answer any outstanding questions
Projects
None yet
Development

No branches or pull requests

4 participants