{"id":29705920,"url":"https://github.com/level12/ans-env-loader","last_synced_at":"2025-07-23T15:41:30.272Z","repository":{"id":300686463,"uuid":"1006818873","full_name":"level12/ans-env-loader","owner":"level12","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-23T04:25:31.000Z","size":139,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-23T04:31:16.590Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/level12.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}},"created_at":"2025-06-23T03:29:41.000Z","updated_at":"2025-06-23T04:25:34.000Z","dependencies_parsed_at":"2025-06-23T04:41:34.305Z","dependency_job_id":null,"html_url":"https://github.com/level12/ans-env-loader","commit_stats":null,"previous_names":["level12/ans-env-vars"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/level12/ans-env-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/level12%2Fans-env-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/level12%2Fans-env-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/level12%2Fans-env-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/level12%2Fans-env-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/level12","download_url":"https://codeload.github.com/level12/ans-env-loader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/level12%2Fans-env-loader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266706715,"owners_count":23971905,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":[],"created_at":"2025-07-23T15:41:22.957Z","updated_at":"2025-07-23T15:41:30.260Z","avatar_url":"https://github.com/level12.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Env Vars\n[![Nox](https://github.com/level12/ans-env-loader/actions/workflows/nox.yaml/badge.svg)](https://github.com/level12/ans-env-loader/actions/workflows/nox.yaml)\n[![pypi](https://img.shields.io/pypi/v/ans-env-loader)](https://pypi.org/project/ans-env-loader/)\n\nExtracts variables from the local environment and converts them to Ansible variables.\n\n## Install and Setup\n\nInstall: `uv add [--dev] ans-env-loader`\n\nThen place an `ans-env-vars.yaml` and an `env-loader.py` into your Ansible playbooks root directory\nas follows:\n\n```sh\n ❯ tree\n├── ansible.cfg\n├── ans-env-vars.yaml\n├── hosts.ini\n├── playbook.yaml\n└── vars_plugins\n    ├── env-loader.py\n\n\n ❯ cat vars_plugins/env-loader.py\nfrom ans_env_loader import VarsModule as VarsModule\n\n\n ❯ cat ans-env-vars.yaml\n# Ansible var name is the same as the expected env var\n- app_smtp_host\n# Map Ansible var name to a different expected env var\n- app_flask_secret: FLASK_SECRET\n```\n\n## Dev\n\n### Copier Template\n\nProject structure and tooling mostly derives from the [Coppy](https://github.com/level12/coppy),\nsee its documentation for context and additional instructions.\n\nThis project can be updated from the upstream repo, see\n[Updating a Project](https://github.com/level12/coppy?tab=readme-ov-file#updating-a-project).\n\n### Project Setup\n\nFrom zero to hero (passing tests that is):\n\n1. Ensure [host dependencies](https://github.com/level12/coppy/wiki/Mise) are installed\n\n2. Start docker service dependencies (if applicable):\n\n   `docker compose up -d`\n\n3. Sync [project](https://docs.astral.sh/uv/concepts/projects/) virtualenv w/ lock file:\n\n   `uv sync`\n\n4. Configure pre-commit:\n\n   `pre-commit install`\n\n5. Run tests:\n\n   `nox`\n\n### Versions\n\nVersions are date based.  A `bump` action exists to help manage versions:\n\n```shell\n\n  # Show current version\n  mise bump --show\n\n  # Bump version based on date, tag, and push:\n  mise bump\n\n  # See other options\n  mise bump -- --help\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevel12%2Fans-env-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevel12%2Fans-env-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevel12%2Fans-env-loader/lists"}