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

Open
1 task done
DenisMkS opened this issue Dec 2, 2024 · 0 comments · May be fixed by #2427
Open
1 task done

support jinja2 filters in hostname #2402

DenisMkS opened this issue Dec 2, 2024 · 0 comments · May be fixed by #2427
Labels
feature This issue/PR relates to a feature request jira WIP Work in progress

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
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 jira WIP Work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants