{"id":15062686,"url":"https://github.com/rh-messaging-qe/yacfg","last_synced_at":"2025-08-30T22:16:00.986Z","repository":{"id":37016208,"uuid":"286967323","full_name":"rh-messaging-qe/yacfg","owner":"rh-messaging-qe","description":"YAML Configurator with templates and profiles","archived":false,"fork":false,"pushed_at":"2024-08-29T22:57:34.000Z","size":3917,"stargazers_count":4,"open_issues_count":21,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-10T14:46:11.238Z","etag":null,"topics":["configuration","jinja2","yaml"],"latest_commit_sha":null,"homepage":"https://rh-messaging-qe.github.io/yacfg/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rh-messaging-qe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","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":"2020-08-12T09:05:07.000Z","updated_at":"2024-06-05T10:11:19.000Z","dependencies_parsed_at":"2023-02-18T10:01:24.495Z","dependency_job_id":"f1d35ea2-c121-4a54-b128-45813c7a370e","html_url":"https://github.com/rh-messaging-qe/yacfg","commit_stats":{"total_commits":267,"total_committers":14,"mean_commits":"19.071428571428573","dds":0.7265917602996255,"last_synced_commit":"8be14174c986b708469414bf148ab2a94262aba8"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/rh-messaging-qe/yacfg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rh-messaging-qe%2Fyacfg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rh-messaging-qe%2Fyacfg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rh-messaging-qe%2Fyacfg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rh-messaging-qe%2Fyacfg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rh-messaging-qe","download_url":"https://codeload.github.com/rh-messaging-qe/yacfg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rh-messaging-qe%2Fyacfg/sbom","scorecard":{"id":773900,"data":{"date":"2025-08-11","repo":{"name":"github.com/rh-messaging-qe/yacfg","commit":"dd23334a6fb32dabd07e4f50d8ad1749a7a48630"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build_image.yaml:1","Warn: no topLevel permission defined: .github/workflows/main.pull_request.workflow.yaml:1","Warn: no topLevel permission defined: .github/workflows/main.push.workflow.yaml:1","Warn: no topLevel permission defined: .github/workflows/released.install.workflow.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_image.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/build_image.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_image.yaml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/build_image.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_image.yaml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/build_image.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_image.yaml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/build_image.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.pull_request.workflow.yaml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/main.pull_request.workflow.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.pull_request.workflow.yaml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/main.pull_request.workflow.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.pull_request.workflow.yaml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/main.pull_request.workflow.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.pull_request.workflow.yaml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/main.pull_request.workflow.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.pull_request.workflow.yaml:91: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/main.pull_request.workflow.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.push.workflow.yaml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/main.push.workflow.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.push.workflow.yaml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/main.push.workflow.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.push.workflow.yaml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/main.push.workflow.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.push.workflow.yaml:74: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/main.push.workflow.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.push.workflow.yaml:105: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/main.push.workflow.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.push.workflow.yaml:108: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/main.push.workflow.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.push.workflow.yaml:114: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/main.push.workflow.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.push.workflow.yaml:136: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/main.push.workflow.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.push.workflow.yaml:149: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/main.push.workflow.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.push.workflow.yaml:151: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/main.push.workflow.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.push.workflow.yaml:163: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/main.push.workflow.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/released.install.workflow.yaml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/released.install.workflow.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/released.install.workflow.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/rh-messaging-qe/yacfg/released.install.workflow.yaml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1","Warn: containerImage not pinned by hash: Dockerfile:3","Warn: containerImage not pinned by hash: Dockerfile:33","Warn: pipCommand not pinned by hash: Dockerfile:25","Warn: pipCommand not pinned by hash: Dockerfile:31","Warn: pipCommand not pinned by hash: .github/workflows/main.pull_request.workflow.yaml:40","Warn: pipCommand not pinned by hash: .github/workflows/main.pull_request.workflow.yaml:41","Warn: pipCommand not pinned by hash: .github/workflows/main.push.workflow.yaml:40","Warn: pipCommand not pinned by hash: .github/workflows/released.install.workflow.yaml:20","Info:   0 out of  15 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   7 third-party GitHubAction dependencies pinned","Info:   0 out of   6 pipCommand dependencies pinned","Info:   0 out of   3 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"23 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-230 / GHSA-248v-346w-9cwc","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-cpwx-vrp4-4pq7","Warn: Project is vulnerable to: GHSA-gmj6-6f8f-6699","Warn: Project is vulnerable to: GHSA-h75v-3vvj-5mfj","Warn: Project is vulnerable to: GHSA-q2x7-8rv6-6q7h","Warn: Project is vulnerable to: GHSA-33p9-3p43-82vq","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: GHSA-753j-mpmx-qq6g","Warn: Project is vulnerable to: GHSA-7cx3-6m66-7c5m","Warn: Project is vulnerable to: GHSA-8w49-h785-mj3c","Warn: Project is vulnerable to: GHSA-qppv-j76h-2rpx","Warn: Project is vulnerable to: GHSA-w235-7p84-xx57","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: PYSEC-2024-187 / GHSA-rqc4-2hc7-8c8v","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T03:00:49.915Z","repository_id":37016208,"created_at":"2025-08-23T03:00:49.915Z","updated_at":"2025-08-23T03:00:49.915Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272914583,"owners_count":25014447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["configuration","jinja2","yaml"],"created_at":"2024-09-24T23:44:40.707Z","updated_at":"2025-08-30T22:16:00.963Z","avatar_url":"https://github.com/rh-messaging-qe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yacfg - YAML Configurator\n\nThis tool can generate a set of configuration files mainly created for\nActiveMQ Artemis, but it is not limited to only generating configuration files.\n\nIt has a user facing Command Line Tool for quick and easy command line usage.\nFurthermore, it is possible to use its API in your python code.\n\n## Getting started\n\n* Python 3.8+\n* Python Poetry\n\n### From git\n\n```bash\ngit clone git@github.com:rh-messaging-qe/yacfg.git\npoetry install\nyacfg --help\n```\n\n### From PyPI\n\n```bash\npip install yacfg\nyacfg --help\n```\n\n## User (CLI) guide\n\n```bash\nyacfg --help\n\n# Set path for profiles and templates\n# For example the ActiveMQ Artemis template and profiles\ngit clone https://github.com/rh-messaging-qe/yacfg_artemis.git ./yacfg_artemis\n\n# Currently is needed to setup profiles and templates paths as environment variables\nexport YACFG_PROFILES=./yacfg_artemis/profiles\nexport YACFG_TEMPLATES=./yacfg_artemis/templates\n\nyacfg --list-profiles\nyacfg --list-templates\n\n# perform a generation of a default profile\nyacfg --profile artemis/default.yaml.jinja2\n\n# also save result to [OUTDIR] directory\nyacfg --profile [PROFILE] --output [OUTDIR]\n```\n\n## Customization\n\nQuickest way to customize data is to use hot-variables, basically variables\nthat the profile itself provides for tuning. Next step is to write (modify) custom\nprofile with completely custom values.\nIf that does not satisfy your needs, then a custom template might be required.\n\n### Profile tuning\n\nSimply export tuning values from profile you want to tune and change those you\nneed to change. Then supply the custom tuning file(s) when generating the profile.\n\n```bash\nyacfg --profile [PROFILE] --export-tuning my_values.yaml\nvim my_values.yaml\nyacfg --profile [PROFILE] --tune my_values.yaml\n\n# multiple tuning files can be overlaid\n# they are updated in sequence, only values present are overwritten\nyacfg --profile [PROFILE] --tune my_values.yaml --tune machine_specific.yaml \\\n       --tune logging_debug.yaml --output [OUTDIR]\n```\n\n## Custom profiles\n\nWrite your own, or simply export an existing profile and modify that.\n\nYou can export dynamic version with includes of some modules, that would still\n work. Either you can use imports from package, or your own local files.\n\nOr you can export completely rendered profile file without any includes or\nvariables and modify that as you like.\n\n\n```bash\n# export profile with dynamic includes still active jinja2 files\nyacfg --profile [PROFILE] --new-profile my_new_profile.yaml.jinja2\n# export completely generated profile without any jinja2 fields, plain yaml\nyacfg --profile [PROFILE] --new-profile-static my_new_profile.yaml\nvim my_new_profile.yaml\nyacfg --profile my_new_profile.yaml\n```\n\nProfile is just another jinja2 file that enables customization of profile data\n -- that is tuning. Because of that we recommend keeping the extension `.yaml.jinja2`\n unless it is static profile without any jinja2 capabilities, in that case it could\n be named `.yaml`. That way we can run yaml lint against static profiles and verify\n that they are correct.\n\n All profiles have to be used to generate files without any tuning. That means,\n if they are tune-able, they have to contain all default values in `_defaults` section.\n That section is also used for tuning, so any variable in there will be exported as tuning.\n\n## Custom templates\n\nThe last resort is to export a template and modify that. But remember a template,\nor more correctly a template set is a directory containing a set of main\ntemplates that subsequently generate_via_tuning_files a new file.\n\nOf course feel free to write your own templates. Especially when you need to\ngenerate_via_tuning_files for something that is not packaged.\n\nJust remember for a template set to be identified the directory must contain\na file named '_template' and then main templates ending with '.jinja2'.\n\n```bash\nyacfg --template [TEMPLATE] --new-template my_new_template\nvim my_new_template/[MAIN_TEMPLATES].jinja2\nyacfg --template my_new_template --profile [PROFILE]\n\n```\n\n## Jinja2 filters:\n\nWe use Jinja2 filters from Ansible project, read more about it here: \n[https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_filters.html](Ansible filters documentation)\n\n## API guide\n\nDirect use of API is to use `generate()` nearly the same as the CLI.\nWith option to use tuning values directly.\n\nTuning data will be overlaid in order of appearance, using python\ndict.update(), so values that will appear later will overwrite previous\nvalues. We recommend that tuning values are always flat, because update\nis not recursive. The same applies for data from tuning files as well\nas the directly provided data.\n\nData application order:\n\n- profile defaults\n- data from tuning files (in order of appearance) `tuning_files_list`\n- data provided directly (in order of appearance) `tuning_data_list`\n\n\n```python\nimport yacfg\n\n# generating only broker.xml config using default values from profile,\n# no tuning, writing output to a target path\nyacfg.generate(\n    profile='artemis/default.yaml.jinja2',\n    output_filter=['broker.xml'],\n    output_path='/opt/artemis-i0/etc/',\n)\n\n# using both files and direct values, and writing generated configs to\n# a target directory\nyacfg.generate(\n    profile='artemis/default.yaml.jinja2',\n    tuning_files_list=[\n        'my_values.yaml',\n        'machine_specific.yaml',\n        'logging_debug.yaml'\n    ],\n    tuning_data_list=[\n        {'name': 'custom name', 'config': 'option_a'},\n        {'address': '10.0.0.1'},\n        {'LOG_LEVEL': 'debug'},\n    ],\n    output_path='/opt/artemis-i0/etc/',\n)\n\n# just get generated data for further processing, using just tuning files\ndata = yacfg.generate(\n    profile='artemis/default.yaml.jinja2',\n    tuning_files_list=[\n        'my_values.yaml',\n        'machine_specific.yaml',\n        'logging_debug.yaml'\n    ],\n)\nprint(data['broker.xml'])\n```\n\n## Batch configurations\n\nIn case you have multiple services to configure in your environment,\nthat you probably will have at some point, there is a tool for that\nas well. The tool is called yacfg-batch. It has only yaml input, and\nit uses yacfg to generate configurations as you are already used to.\n\nInput yaml file defines all services you need to generate, what\nprofiles to use, and what tuning to provide to `yacfg`.\nIt allows you to configure defaults and common for services.\n\n### Batch profile file\n\nAs said it is YAML. It has two special sections: `_default` and `_common`.\nAs the name suggests, `_default` values are used when values are not\ndefined per specific section. Where `_common` is added to the values\nof all sections. The important thing here is that `_default` has lower\npriority than `_common` and that has lower priority than specific section\nvalues.\n\nEvery section has 4 values: `profile`, `template`, `tuning_files`,\n and `tuning`. As the name suggests, `profile` defines what generation profile\n to select, and it directly correlates with `yacfg`'s `--profile`.\n `template` defines what generation template to use\n (overrides one in the profile if defined), and it directly correlates with\n `--template` from `yacfg`. `tuning_files` option is a list of tuning\n files to use, when combining defaults, commons, and specific values,\n tuning_files list is concatenated. Finally `tuning` is a map of\n specific tuning values, correlates with `--opt` of `yacfg`. When combining\n defaults, commons, and specifics, it will be updated over using python\n dict.update() and it will work only on first level, so it is recommended\n to use flat values for tuning only.\n\n#### Example\n```yaml\n\n_default:\n    profile: artemis/default.yaml.jinja2\n    tuning_files:\n      - defaults/broker_default.yaml\n\n_common:\n    tuning_files:\n      - common/security.yaml\n      - common/logging.yaml\n    tuning_values:\n      LOG_LEVEL_ALL: INFO\n\nbrokerA/opt/artemis/etc:\n    pass: true\n\nbrokerB/opt/artemis/etc:\n    profile: artemis/AIOBasic.yaml.jinja2\n    tuning_files:\n      - brokerB/queues.yaml\n\n---\n\n_default:\n    profile: artemis/default.yaml.jinja2\n    tuning_files:\n      - defaults/broker_default.yaml\n\nbrokerC/opt/amq/etc:\n    tuning:\n      LOG_LEVEL_ALL: DEBUG\n\n```\n\nAs you can see, `yacfg-batch` supports multiple sections, in single\nbatch profile file, that allows you to generate multiple groups using\nseparated `_default` and `_common` sections for that.\n\n#### Executing batch\n\nWhen you have defined all tuning files you need, and in the root of this\nbatch configuration you have your batch profile file, you can now simply\nrun `yacfg-batch`:\n\n```bash\n\nyacfg-batch --input [batch_profile_file] --output [output_path]\n```\n\nYou can use multiple input files and all of those will be generated\nconsecutively. In the output path, new subdirectories will be created\nfor every item you configure (every section), section key will be used\nfor that subdirectory. If the section name resembles a path, whole\npath will be created. For example for `brokerA/opt/artemis/etc`\nthe configuration will be generated into\n`[output_path]/brokerA/opt/artemis/etc/`.\n\n## Documentation\nFormatted documentation can be viewed at [rh-messaging-qe.github.io/yacfg/](https://rh-messaging-qe.github.io/yacfg/).\n\n\n## Contributing\n\nIf you find a bug or room for improvement, submit either a ticket or PR.\n\n## Contributors\n\n_Alphabetically ordered_\n\n* Dominik Lenosi \u003cdlenoch@redhat.com\u003e (maintainer)\n* Michal Tóth \u003cmtoth@redhat.com\u003e\n* Otavio Piske \u003copiske@redhat.com\u003e\n* Sean Davey \u003csdavey@redhat.com\u003e\n* Zdenek Kraus \u003czkraus@redhat.com\u003e (author)\n\n## License\n\nCopyright 2018-2023 Red Hat Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n## Acknowledgments\n\n* [jinja2](http://jinja.pocoo.org/docs/2.10/) -- awesome templating engine\n* [yaml](http://yaml.org/) -- very convenient user readable format\n* [learn_yaml](https://learnxinyminutes.com/docs/yaml/) -- great YAML cheat sheet\n* [pyyaml](https://github.com/yaml/pyyaml) -- python YAML parser\n* [jq](https://stedolan.github.io/jq/) -- great tool for working with structured data (JSON)\n* [yq](https://yq.readthedocs.io/en/latest/) -- YAML variant of jq\n* [github templates examples](https://github.com/stevemao/github-issue-templates/tree/master/simple) -- Nice set of ISSUE_TEMPLATE.md and PULL_REQUESTS_TEMPLATE.md examples\n* [contributing example](https://gist.github.com/PurpleBooth/b24679402957c63ec426) -- example/template of CONTRIBUTING.md\n* [Fedora Project code-of-conduct](https://docs.fedoraproject.org/en-US/project/code-of-conduct/) -- the inspiration for CODE_OF_CONDUCT.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frh-messaging-qe%2Fyacfg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frh-messaging-qe%2Fyacfg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frh-messaging-qe%2Fyacfg/lists"}