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 mechanism to pass jinja_filters #113

Merged
merged 2 commits into from
Apr 10, 2018
Merged

add mechanism to pass jinja_filters #113

merged 2 commits into from
Apr 10, 2018

Conversation

dbarrosop
Copy link
Contributor

For instance:

# jinja_filters/__init__.py

def get_filters():
    return {"test": test}


def test(data):
    return "yes!!!"

and then:

    brg = InitBrigade(
        dry_run=dry_run,
        SimpleInventory={"host_file": HOSTS_FILE, "group_file": GROUPS_FILE},
        jinja_filters="jinja_filters.get_filters",
    )

@dbarrosop
Copy link
Contributor Author

Solves #94

@coveralls
Copy link

coveralls commented Apr 9, 2018

Pull Request Test Coverage Report for Build 536

  • 19 of 20 (95.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-4.2%) to 87.363%

Changes Missing Coverage Covered Lines Changed/Added Lines %
brigade/core/configuration.py 8 9 88.89%
Totals Coverage Status
Change from base Build 534: -4.2%
Covered Lines: 878
Relevant Lines: 1005

💛 - Coveralls

Copy link
Collaborator

@ogenstad ogenstad left a comment

Choose a reason for hiding this comment

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

Looks good.

@dbarrosop dbarrosop merged commit 260393d into develop Apr 10, 2018
@dbarrosop dbarrosop deleted the jinja_filters branch May 3, 2018 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants