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

Unable to create Smart Inventory from information of Inventory created in different Organizations #7630

Closed
garamirseokim opened this issue Jul 16, 2020 · 5 comments

Comments

@garamirseokim
Copy link

garamirseokim commented Jul 16, 2020

ISSUE TYPE
  • Bug Report
SUMMARY

Unable to create Smart Inventory from information of Inventory created in different Organizations even if users have inventory "Admin" permission.

ENVIRONMENT

Ansible Tower version: 3.7.0 and 3.6.2
Operating System: RHEL 7.7

STEPS TO REPRODUCE

Creating Access
Login to Dashboard as admin user

  1. Create Organization "ORG-GROUP" and "ORG-TEAM"
  2. Create Team "MY-TEAM" (Organization is ORG-TEAM)
  3. Create User "testuser" (Organization is ORG-TEAM)
  4. Register "testuser" with "MY-TEAM" Team
  5. Inventory Create "Test Inventory" and register some hosts (Organization is ORG-GROUP)
  6. Assign Admin Role of "Test Inventory" to Team "MY-TEAM"

Creating Smart Inventory
Login to Dashboard again as testuser user

  1. Make sure "Test Inventory" is existing in Inventory
  2. Check that the host can be listed from the HOST tab of "Test Inventory" and you are able to see the host list.

image

  1. Try to create a Smart Inventory
EXPECTED RESULTS

Able to search the host list from Dynamic/Static Inventory(Test Inventory) to create Smart Inventory with user "testuser".

ACTUAL RESULTS

Unable to search any host from Dynamic/Static Inventory(Test Inventory) to create a Smart Inventory with user "testuser".
image

ADDITIONAL INFORMATION

None

@garamirseokim garamirseokim changed the title Unable to create Smart Inventory from information of Inventory created in different Organizations even if users have inventory "Admin" permission Unable to create Smart Inventory from information of Inventory created in different Organizations Jul 16, 2020
@wenottingham
Copy link
Contributor

Note that the smart inventory will still be limited to a particular organization. Can you create it via the API?

@garamirseokim
Copy link
Author

garamirseokim commented Jul 17, 2020

@wenottingham I was able to create a Smart Inventory via API but I can't see the host list. Is there any other workaround?

{
    "name": "newSmartInventory",
    "description": "",
    "organization": 3,
    "kind": "smart",
    "host_filter": null,
    "variables": "",
    "insights_credential": null,
    "host_filter": "name__icontains=192.168.100.222"
}

@wenottingham
Copy link
Contributor

You have host_filter twice in that output, I don't think that's the actual definition?

@garamirseokim
Copy link
Author

garamirseokim commented Jul 20, 2020

@wenottingham Thank you for your feedback. I tried it again with single host_filter as below but I still can't see the host list.

{
    "name": "newSmartInventory",
    "description": "",
    "organization": 3,
    "kind": "smart",
    "variables": "",
    "insights_credential": null,
    "host_filter": "name__icontains=192.168.100.222"
}

@TheRealHaoLiu
Copy link
Member

Smart inventories is deprecated in favor of constructed inventory #13303

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants