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