mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Module: Tower inventory source module (#37110)
* tower_inventory_source: Add support for the inventory source via ansible-tower-cli. * Add test coverage for tower_inventory_source. * Update version_added to 2.7
This commit is contained in:
parent
6733bffd5d
commit
fc2c8a4ec8
3 changed files with 379 additions and 0 deletions
2
test/integration/targets/tower_inventory_source/aliases
Normal file
2
test/integration/targets/tower_inventory_source/aliases
Normal file
|
@ -0,0 +1,2 @@
|
|||
cloud/tower
|
||||
posix/ci/cloud/group4/tower
|
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
- name: Add a Tower credential
|
||||
tower_credential:
|
||||
description: Credentials for Openstack Test project
|
||||
name: openstack-test-credential
|
||||
kind: openstack
|
||||
organization: Default
|
||||
project: Test
|
||||
username: admin
|
||||
host: https://example.org:5000
|
||||
password: passw0rd
|
||||
domain: test
|
||||
|
||||
- name: Add a Tower inventory
|
||||
tower_inventory:
|
||||
description: Test inventory
|
||||
name: openstack-test-inventory
|
||||
organization: Default
|
||||
|
||||
- name: Create a source inventory
|
||||
tower_inventory_source:
|
||||
name: source-test-inventory
|
||||
description: Source for Test inventory
|
||||
inventory: openstack-test-inventory
|
||||
credential: openstack-test-credential
|
||||
overwrite: True
|
||||
update_on_launch: True
|
||||
source_vars: "---\nprivate: false"
|
||||
source: openstack
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
Loading…
Add table
Add a link
Reference in a new issue