{"id":19204418,"url":"https://github.com/mmul-it/tfs_generator","last_synced_at":"2025-05-12T15:46:08.762Z","repository":{"id":156435724,"uuid":"605503940","full_name":"mmul-it/tfs_generator","owner":"mmul-it","description":"TF generator Ansible Role -  TF manifests generation and management","archived":false,"fork":false,"pushed_at":"2025-04-17T17:09:59.000Z","size":579,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-18T07:46:36.030Z","etag":null,"topics":["ansible","ansible-playbook","opentofu","terraform","tfs"],"latest_commit_sha":null,"homepage":"https://www.miamammausalinux.org","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mmul-it.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-02-23T09:49:01.000Z","updated_at":"2025-04-17T17:10:03.000Z","dependencies_parsed_at":"2023-12-05T11:48:23.005Z","dependency_job_id":"4434f0d9-8b2c-47d7-8863-b7992e370d04","html_url":"https://github.com/mmul-it/tfs_generator","commit_stats":null,"previous_names":["mmul-it/tfs_generator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmul-it%2Ftfs_generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmul-it%2Ftfs_generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmul-it%2Ftfs_generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmul-it%2Ftfs_generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmul-it","download_url":"https://codeload.github.com/mmul-it/tfs_generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253767695,"owners_count":21961160,"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","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","ansible-playbook","opentofu","terraform","tfs"],"created_at":"2024-11-09T13:07:52.872Z","updated_at":"2025-05-12T15:46:08.737Z","avatar_url":"https://github.com/mmul-it.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![TFs generator Ansible Role](./images/tfs_generator-github-header.png)\n\nThis role can be used to install tf tool binary and deploy tf manifest files\n(`.tf`) starting from an Ansible inventory, to create a fully atomated and\nidempotent Infrastructure as Code scenario.\n\n[![Lint and test the project](https://github.com/mmul-it/tfs_generator/actions/workflows/main.yml/badge.svg)](https://github.com/mmul-it/tfs_generator/actions/workflows/main.yml)\n[![Ansible Galaxy](https://img.shields.io/badge/ansible--galaxy-tfs_generator-blue.svg)](https://galaxy.ansible.com/mmul/tfs_generator)\n\n## Role Variables\n\nAll the useful variables are commented into the defaults file, the main ones are\nthese:\n\n```yaml\n---\n\n# Install tf cmd binary\ntf_binary_install: true\ntf_binary_version: '0.14.2'\ntf_binary_platform: 'linux_amd64'\ntf_binary_url: \"https://releases.hashicorp.com/terraform/{{ tf_binary_version }}/\\\n                terraform_{{ tf_binary_version }}_{{ tf_binary_platform }}.zip\"\n\n# Name of the command used to generate tf files\ntf_cmd: 'terraform'\n\n# Where to deploy tf resource files\ntf_config_dir: 'tfs'\n\n# Delete existing resources before deploying new ones\ntf_purge: false\n```\n\nTo start working with this role you'll need to choose which provider will be\nused to generate tf manifests, currently `libvirt` (default) and `azure` are\nthe two supporterd providers.\n\n```yaml\n# Which environment we're going to deploy\ntf_cloud_provider: 'libvirt'\n```\n\nTo get specific configuration options look at the [Libvirt](Libvirt.md) or\n[Azure](Azure.md) page:\n\n[\u003cimg src=\"https://libvirt.org/logos/logo-square-128.png\" alt=\"Libvirt\" width=\"128px\"\u003e](Libvirt.md)\n[\u003cimg src=\"https://cdn-dynmedia-1.microsoft.com/is/content/microsoftcorp/azure-blue\" alt=\"Azure\" width=\"128px\"\u003e](Azure.md)\n\n## Example playbook\n\nTo test this role and generate a set of tf manifests, just use the\n[tests/tfs_generator.yml](tests/tfs_generator.yml) playbook passing the test\ninventory with `-i tests/inventory`:\n\n```console\n\u003e ansible-playbook -i tests/inventory tests/tfs_generator.yml\n\nPLAY [Create tf manifests using tfs_generator Ansible role] ******************************************************************************\n\nTASK [Gathering Facts] ************************************************************************************************************************************\nok: [localhost]\n\n...\n...\n\nPLAY RECAP ************************************************************************************************************************************************\nlocalhost                  : ok=15   changed=7    unreachable=0    failed=0    skipped=2    rescued=0    ignored=0\n```\n\nThis will generate a `tests/tf` directory containing all the generated\nmanifests.\n\nTo learn how to use this with the tf tool to automate environment generation\ncheck the [Libvirt](Libvirt.md) page.\n\n## License\n\nMIT\n\n## Author Information\n\nRaoul Scarazzini ([rascasoft](https://github.com/rascasoft))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmul-it%2Ftfs_generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmul-it%2Ftfs_generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmul-it%2Ftfs_generator/lists"}