- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise Software
- >
- Re: Ansible Integration Inventory
Categories
Company
Local Language
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022 01:02 PM
04-13-2022 01:02 PM
Ansible Integration Inventory
Hello All,
I wanted to understand the below 2 situation.
Statement"
say I have created a ansible integration for a repo which have the code to provision the instance for me and that is bind to tasks + workflow + service catalog. in this case when the catalog gets executed it will provision the VM and details about the same would be present in the ansible integration inventory.
Problem Statement:
-
how can i have all the pre-existing vms/workflow (say 15 vms for the moment) information added to a newly create integration which is basically create for new repo.
-
lets say i have playbook for which a task + workflow and catalog is create and the job of this playbook is to create a user on some user selected vms and this code is available on a new dedicated repo and integration is also created for this repo is created (related point - 1 here, by default this new integration inventory would be empty)
For more reference say catalog have inputs like
- list of server from a tenant that user need to select
- text for username
- text for the password
Then what changes I would need to make to accommodate the select host when inventory is empty to execute the playbook
---
- name: Add a user
hosts: xxx ### **what changes to do here?**
gather_facts: false
tasks:
- name: Add User
user:
name: "{{ morpheus['customOptions']['username'] }}"
password: "{{ morpheus['customOptions']['password] }}"
state: present
- Tags:
- Ansible
- automation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2022 08:34 AM
04-14-2022 08:34 AM
Re: Ansible Integration Inventory
There’s two ways to deal with limiting hosts, use --limit in the command options, or use an inventory that only contains what you need.
In this case, do you want to select one vm to run the task against, or select multiples based on some criteria? Right now, Morpheus doesn’t allow you to select an arbitrary number of VMs and create an ansible inventory group out of them.
The easiest way to do this currently is to run your ansible task against each instance individually.