Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support jinja2 filters in hostname #2402

Closed
1 task done
DenisMkS opened this issue Dec 2, 2024 · 0 comments · Fixed by #2427
Closed
1 task done

support jinja2 filters in hostname #2402

DenisMkS opened this issue Dec 2, 2024 · 0 comments · Fixed by #2427
Labels
feature This issue/PR relates to a feature request has_pr jira

Comments

@DenisMkS
Copy link

DenisMkS commented Dec 2, 2024

Summary

We have a self-service for our developers which they can use to create sandboxes on AWS. This tool names instances like

exmpl-qa-sbx-mikalai-epd-test-3423
exmpl-qa-sbx-jacekbj-s02-4f2b
exmpl-service-sbx-demo-8772
exmpl-service-sbx-customer-40d7
exmpl-qa-sbx-george-15112024-571f
exmpl-qa-sbx-database-testing-b0ec 

but internally we remove exmpl-(qa|service)-sbx- part and use the rest as hostname. At the moment it's done manually and started to look at dynamic inventory, however I couldn't find a way to "compose" a hostname. It would be nice to support something like this:

hostnames:
  - "tag:Name | replace('exmpl-qa-sbx-', '')"

Issue Type

Feature Idea

Component Name

aws_ec2

Additional Information

Here is old similar issue which was closed but I didn't find it here

ansible/ansible#55911

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@gravesm gravesm added feature This issue/PR relates to a feature request jira and removed needs_triage labels Dec 3, 2024
@abikouo abikouo added the WIP Work in progress label Dec 17, 2024
@abikouo abikouo added has_pr and removed WIP Work in progress labels Jan 7, 2025
patchback bot pushed a commit that referenced this issue Jan 13, 2025
SUMMARY

Closes #2402

ISSUE TYPE

Feature Pull Request

COMPONENT NAME

inventory/aws_ec2

Reviewed-by: Helen Bailey <[email protected]>
(cherry picked from commit 995bf94)
patchback bot pushed a commit that referenced this issue Jan 13, 2025
SUMMARY

Closes #2402

ISSUE TYPE

Feature Pull Request

COMPONENT NAME

inventory/aws_ec2

Reviewed-by: Helen Bailey <[email protected]>
(cherry picked from commit 995bf94)
softwarefactory-project-zuul bot pushed a commit that referenced this issue Jan 14, 2025
#2456)

This is a backport of PR #2427 as merged into main (995bf94).
SUMMARY

Closes #2402

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

inventory/aws_ec2

Reviewed-by: Helen Bailey <[email protected]>
Reviewed-by: Bikouo Aubin
alinabuzachis pushed a commit to alinabuzachis/amazon.aws that referenced this issue Jan 15, 2025
…le-collections#2427)

SUMMARY

Closes ansible-collections#2402

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

inventory/aws_ec2

Reviewed-by: Helen Bailey <[email protected]>
alinabuzachis pushed a commit to alinabuzachis/amazon.aws that referenced this issue Jan 15, 2025
…le-collections#2427)

SUMMARY

Closes ansible-collections#2402

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

inventory/aws_ec2

Reviewed-by: Helen Bailey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request has_pr jira
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants