- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise
- >
- Can we use ansible to provision an ec2 instance?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
11-15-2022 09:38 AM
11-15-2022 09:38 AM
Can we use ansible to provision an ec2 instance?
Can we use ansible playbook to provision ec instance and run some additional playbooks to make some configuration inside an ec instance at os level?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2022 07:55 AM
11-21-2022 07:55 AM
Re: Can we use ansible to provision an ec2 instance?
Hi @Paul_B
The playbooks can be run before the start of provisioing the EC2 and more can be run after the instance is in the running state.
Can you elaborate more on the type of tasks you would execute in parallel to ec2 instance provisioning.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 06:28 AM
12-14-2022 06:28 AM
Re: Can we use ansible to provision an ec2 instance?
Provisioning an EC2 instance using Morpheus and running tasks against the machine once it is deployed is one of Morpheus’ primary use cases. You can run any supported task against a deployed instance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2022 05:58 AM
11-17-2022 05:58 AM
Re: Can we use ansible to provision an ec2 instance?
There is no documentation on this because Morpheus uses it’s own internal process to provision EC2 instances. There is no supported workflow where Ansible is creating the instance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2022 10:53 AM
11-15-2022 10:53 AM
Re: Can we use ansible to provision an ec2 instance?
An Ansible playbook is capable of creating EC2 instances in AWS. You can also use Ansible to configure an OS once launched. I’m not sure you’d want to use Morpheus to run ad-hoc Ansible playbooks to launch unmanaged EC2 instances, though.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 07:45 AM
12-14-2022 07:45 AM
Re: Can we use ansible to provision an ec2 instance?
Is there a way to get the variable from provisioned ec2 instance , pass it to the running tasks.
Example : A task is depending on provisioned instance ip address , ip address is dynamic , so a task need to fetch the ip from ec2 once it provisioned and pass it to the next task

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 10:03 PM
11-16-2022 10:03 PM
Re: Can we use ansible to provision an ec2 instance?
HI , Thanks for your response , We want to provision an ec2 instance + additional some configuration along with this ec2 task , While running ec2 playbook , it also has to run additional playbooks which does some additional configuration on storage side ,
But i stuck here to setp this workflow , Do you have any doc for ansible to provision ec on morphoues data , our playbooks are ready

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 05:00 AM
11-18-2022 05:00 AM
Re: Can we use ansible to provision an ec2 instance?
Ok , Pls correct me ,
-
we cannot use ansible playbook to provision an ec2 instance , we need to use different
process to provision ec2 instance , is my understanding right ? -
But i want some different ansible playbooks to run along with ec2 instance provision task , is that can be done ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 01:22 PM
12-14-2022 01:22 PM
Re: Can we use ansible to provision an ec2 instance?
If you’d like to see an example of the information that Morpheus makes available for it’s provisioning tasks, try this python task: morpheus-automation-examples/py-dump-env.py at main · gomorpheus/morpheus-automation-examples · GitHub You can put it in a provisioning workflow and run it against an instance.
I would recommend taking a look at some of the youtube videos we have available here: https://www.youtube.com/@Gomorpheus They can provide some understanding of the base level functions of Morpheus and how to use them.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2022 08:56 AM
12-13-2022 08:56 AM
Re: Can we use ansible to provision an ec2 instance?
Hi Let me put my usecase ,
I want to keep couple of playbooks , one playbook(if morpheus data support) is to provision ec2 instance , then two more additional playbook to configure iscsi storage connectivity to onprem storage controller
OR
If we have to use morpheus data workflow to provision ec2 instance then after immediate we wanna run couple of playbooks , but that playbooks need to get the variable data from provisoned ec2 instance , data needs to be passed in to variable
More detailed explanation :
I want to provision a ec2 instance and get the value from cat /etc/iscsi/initiatorname.iscsi this file and pass this value to a playbook variable part ,
Condition : I can use ansible playbook to provision ec2 instance then run some different playbooks after ec3 provisioned .
Or if morphues data supports its own workflow to provision ec2 instance then we will be ready to use it but we want to get the value of cat /etc/iscsi/initiatorname.iscsi this file from the provisioned ec2 instance and pass this value to a playbook variable part which runs once ec2 provisoned
i want to if it can be done using morpheus data or not , working for one of the customer usecase