{"id":15494857,"url":"https://github.com/simonkowallik/j2f5","last_synced_at":"2026-04-20T19:32:11.564Z","repository":{"id":145419609,"uuid":"327297106","full_name":"simonkowallik/j2f5","owner":"simonkowallik","description":"j2cli extension with focus on templating F5 iRules","archived":false,"fork":false,"pushed_at":"2022-11-12T11:57:53.000Z","size":408,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-30T07:27:16.841Z","etag":null,"topics":["ansible","f5-bigip","f5networks","irules","j2cli","templating"],"latest_commit_sha":null,"homepage":"https://simonkowallik.github.io/j2f5/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonkowallik.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-06T11:55:42.000Z","updated_at":"2022-11-12T11:10:33.000Z","dependencies_parsed_at":"2023-06-03T17:45:09.718Z","dependency_job_id":null,"html_url":"https://github.com/simonkowallik/j2f5","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simonkowallik/j2f5","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonkowallik%2Fj2f5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonkowallik%2Fj2f5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonkowallik%2Fj2f5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonkowallik%2Fj2f5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonkowallik","download_url":"https://codeload.github.com/simonkowallik/j2f5/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonkowallik%2Fj2f5/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32062340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","f5-bigip","f5networks","irules","j2cli","templating"],"created_at":"2024-10-02T08:15:27.223Z","updated_at":"2026-04-20T19:32:11.558Z","avatar_url":"https://github.com/simonkowallik.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# j2f5\n\n[![CI Pipeline](https://github.com/simonkowallik/j2f5/actions/workflows/ci-pipeline.yaml/badge.svg)](https://github.com/simonkowallik/j2f5/actions/workflows/ci-pipeline.yaml)\n\n`j2f5` is a customization for [j2cli](https://pypi.org/project/j2cli/), which again is a command line tool to template any kind of text based files using python's famous jinja2.\n\n`j2f5` focuses on F5 related code (specifically iRules), but isn't limited to it. It is supposed to be a relatively lightweight addition to j2cli.\n\n## Features\n\n- adds ansible filters (when ansible is available)\n- supports custom jinja2 delimiters\n- sane formatting defaults\n\n\n## by example:\n\nCopy and run this example:\n\n```shell\ncat \u003c\u003cEOF \u003e configuration.yaml\n# configuration.yaml\nerror:\n    heading: \"Sorry :-(\"\n    message: \"Sorry, we can't serve your request right now.\"\n    include_id: true\nEOF\n\n\ncat \u003c\u003c'EOF' \u003e lb_sorry_page.irule.j2\n# lb_sorry_page.irule.j2\nwhen LB_FAILED {\n    {# generate unique error_id and log when error.include_id is true #}\n    {% if error.include_id %}\n    set error_id [lindex [AES::key 128] 2]\n    log local0.error \"LB failed for [FLOW::this], error_id:$error_id\"\n    {% endif %}\n    HTTP::respond 503 content \"\u003chtml\u003e\u003cbody\u003e\n    \u003ch1\u003e{{error.heading}}\u003c/h1\u003e\n    \u003cp\u003e{{error.message}}\u003c/p\u003e\n    {% if error.include_id %}\n    \u003cp\u003eerror_id: $error_id\u003c/p\u003e\n    {% endif %}\n    \u003c/body\u003e\u003c/html\u003e\" Connection Close\n}\n\nEOF\n\nj2 --customize j2f5.py lb_sorry_page.irule.j2 configuration.yaml \\\n    -o lb_sorry_page.irule\n\ncat lb_sorry_page.irule\n```\n\nWill produce:\n```tcl\n# lb_sorry_page.irule.j2\nwhen LB_FAILED {\n    set error_id [lindex [AES::key 128] 2]\n    log local0.error \"LB failed for [FLOW::this], error_id:$error_id\"\n    HTTP::respond 503 content \"\u003chtml\u003e\u003cbody\u003e\n    \u003ch1\u003eSorry :-(\u003c/h1\u003e\n    \u003cp\u003eSorry, we can't serve your request right now.\u003c/p\u003e\n    \u003cp\u003eerror_id: $error_id\u003c/p\u003e\n    \u003c/body\u003e\u003c/html\u003e\" Connection Close\n}\n```\n\nIn `configuration.yaml` set:\n```yaml\n    include_id: false\n```\n\nRun:\n```shell\nj2 --customize j2f5.py lb_sorry_page.irule.j2 configuration.yaml \\\n    -o lb_sorry_page.irule\n\ncat lb_sorry_page.irule\n```\n\nAnd observe the result:\n\n```tcl\n# lb_sorry_page.irule.j2\nwhen LB_FAILED {\n    HTTP::respond 503 content \"\u003chtml\u003e\u003cbody\u003e\n    \u003ch1\u003eSorry :-(\u003c/h1\u003e\n    \u003cp\u003eSorry, we can't serve your request right now.\u003c/p\u003e\n    \u003c/body\u003e\u003c/html\u003e\" Connection Close\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonkowallik%2Fj2f5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonkowallik%2Fj2f5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonkowallik%2Fj2f5/lists"}