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

Add a new "contains" jinja2 test #45798

Merged
merged 2 commits into from
Nov 7, 2018
Merged

Add a new "contains" jinja2 test #45798

merged 2 commits into from
Nov 7, 2018

Conversation

sivel
Copy link
Member

@sivel sivel commented Sep 18, 2018

SUMMARY

Add a new contains jinja2 test that operates similarly to the jinja2 provided in test, but with reversed arguments allowing use in filters such as map and selectattr.

See changed docs for an example.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

lib/ansible/plugins/test/mathstuff.py

ANSIBLE VERSION
2.8
ADDITIONAL INFORMATION

@sivel sivel requested a review from bcoca September 18, 2018 15:30
@ansibot
Copy link
Contributor

ansibot commented Sep 18, 2018

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 docs This issue/PR relates to or includes documentation. feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. labels Sep 18, 2018
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Sep 18, 2018
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Sep 18, 2018
@bcoca
Copy link
Member

bcoca commented Sep 19, 2018

just to bikeshed: 'has' seems like a nicer name (shorter to type) .. but it might not be as 'pythonic'

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Sep 20, 2018
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Sep 20, 2018
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Oct 4, 2018
@ansibot ansibot added the core_review In order to be merged, this PR must follow the core review workflow. label Oct 25, 2018
@ansible ansible deleted a comment from ansibot Nov 7, 2018
Copy link
Contributor

@acozine acozine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sivel, looks good.

@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Nov 7, 2018
@sivel sivel merged commit f728f2b into ansible:devel Nov 7, 2018
mjmayer pushed a commit to mjmayer/ansible that referenced this pull request Nov 30, 2018
* Add contains jinja2 test

* backticks
Tomorrow9 pushed a commit to Tomorrow9/ansible that referenced this pull request Dec 4, 2018
* Add contains jinja2 test

* backticks
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 core_review In order to be merged, this PR must follow the core review workflow. docs This issue/PR relates to or includes documentation. feature This issue/PR relates to a feature request. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants