You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ec2_instance — back when it was just ec2 — would start a new instance on every run. At some point, it stopped doing that. Now, if there's an existing instance matching some properties of the instance I'm trying to create, it would target that instance instead of launching a new one.
Given that Ansible tasks are supposed to be idempotent, I guess the new way of working makes more sense. But there are cases where I need the old behavior.
I browsed the docs of the module and couldn't find anything — like a flag — to force creation of a new instance. Either I'm missing something, or it's just impossible to do it anymore.
A workaround I'm currently using to reproduce the old behavior is appending the current timestamp to the name of the instance. That makes the Name tag unique and hence it launches a new instance on every run. But it'd be nice to have a more elegant solution.
I'm proposing to add a new state like launched which would do exactly that — launch a new instance.
Issue Type
Feature Idea
Component Name
ec2_instance
Additional Information
No response
Code of Conduct
I agree to follow the Ansible Code of Conduct
The text was updated successfully, but these errors were encountered:
Summary
ec2_instance
— back when it was justec2
— would start a new instance on every run. At some point, it stopped doing that. Now, if there's an existing instance matching some properties of the instance I'm trying to create, it would target that instance instead of launching a new one.Given that Ansible tasks are supposed to be idempotent, I guess the new way of working makes more sense. But there are cases where I need the old behavior.
I browsed the docs of the module and couldn't find anything — like a flag — to force creation of a new instance. Either I'm missing something, or it's just impossible to do it anymore.
A workaround I'm currently using to reproduce the old behavior is appending the current timestamp to the name of the instance. That makes the
Name
tag unique and hence it launches a new instance on every run. But it'd be nice to have a more elegant solution.I'm proposing to add a new
state
likelaunched
which would do exactly that — launch a new instance.Issue Type
Feature Idea
Component Name
ec2_instance
Additional Information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: