{"id":15780337,"url":"https://github.com/rgl/infra-toolbox","last_synced_at":"2025-08-11T06:46:25.584Z","repository":{"id":41527609,"uuid":"444311213","full_name":"rgl/infra-toolbox","owner":"rgl","description":"a toolbox for launching infrastructure wrapped in a vagrant environment","archived":false,"fork":false,"pushed_at":"2023-01-11T08:56:41.000Z","size":167,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-31T11:06:04.297Z","etag":null,"topics":["ansible","azure","cue","dagger","helm","infra","infrastructure","infrastructure-as-code","infrastructure-management","kubernetes","packer","terraform","vagrant","vsphere"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/rgl.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}},"created_at":"2022-01-04T06:31:50.000Z","updated_at":"2023-01-13T09:30:15.000Z","dependencies_parsed_at":"2023-02-09T02:30:33.965Z","dependency_job_id":null,"html_url":"https://github.com/rgl/infra-toolbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Finfra-toolbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Finfra-toolbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Finfra-toolbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Finfra-toolbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rgl","download_url":"https://codeload.github.com/rgl/infra-toolbox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243547633,"owners_count":20308744,"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","azure","cue","dagger","helm","infra","infrastructure","infrastructure-as-code","infrastructure-management","kubernetes","packer","terraform","vagrant","vsphere"],"created_at":"2024-10-04T18:41:15.730Z","updated_at":"2025-03-14T08:32:39.144Z","avatar_url":"https://github.com/rgl.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\r\n\r\n[![Build status](https://github.com/rgl/infra-toolbox/workflows/build/badge.svg)](https://github.com/rgl/infra-toolbox/actions?query=workflow%3Abuild)\r\n\r\nThis is a vagrant environment for launching infrastructure using:\r\n\r\n* Ansible\r\n* Cue\r\n* Dagger\r\n* Helm\r\n* Kubectl\r\n* Packer\r\n* Terraform\r\n* Vagrant\r\n\r\nIn:\r\n\r\n* Microsoft Azure\r\n* Google Cloud Platform (GCP)\r\n* VMware vSphere\r\n\r\nAnd, using nested virtualization, in:\r\n\r\n* QEMU/KVM/libvirt\r\n\r\n# Usage\r\n\r\nSee the [rgl/ubuntu-vagrant repository](https://github.com/rgl/ubuntu-vagrant) to known how to launch this Ubuntu 22.04 based environment using vagrant.\r\n\r\nThen follow one of the next sections example to known how to manage a remote machine using this environment tools.\r\n\r\n## Ansible Ubuntu Example\r\n\r\nEnter the vagrant environment:\r\n\r\n```bash\r\nvagrant ssh\r\n```\r\n\r\nCreate an example inventory and playbook:\r\n\r\n```bash\r\nmkdir ubuntu-example\r\ncd ubuntu-example\r\ncat \u003einventory.yml \u003c\u003c'EOF'\r\nall:\r\n  children:\r\n    example:\r\n      hosts:\r\n        192.168.192.123:\r\n  vars:\r\n    # connection configuration.\r\n    # see https://docs.ansible.com/ansible-core/2.14/collections/ansible/builtin/ssh_connection.html\r\n    ansible_user: vagrant\r\n    ansible_password: vagrant\r\nEOF\r\ncat \u003eansible.cfg \u003c\u003c'EOF'\r\n[defaults]\r\ninventory = inventory.yml\r\nstdout_callback = community.general.yaml\r\nhost_key_checking = False # NB only do this in test scenarios.\r\nEOF\r\ncat \u003eplaybook.yml \u003c\u003c'EOF'\r\n- hosts: example\r\n  gather_facts: false\r\n  become: true\r\n  tasks:\r\n    - name: Update APT cache\r\n      apt:\r\n        update_cache: true\r\n        cache_valid_time: 10800 # 3h\r\n      changed_when: false\r\n    - name: Install tcpdump\r\n      apt:\r\n        name: tcpdump\r\nEOF\r\n```\r\n\r\nKick the tires:\r\n\r\n```bash\r\nansible-lint --offline --parseable playbook.yml\r\nansible-inventory --list --yaml\r\nansible -m ping all\r\nansible -m gather_facts all\r\nansible -m command -a 'id' all\r\n```\r\n\r\nRun the playbook:\r\n\r\n```bash\r\nansible-playbook playbook.yml #-vvv\r\n```\r\n\r\n## Ansible Windows Example\r\n\r\nEnter the vagrant environment:\r\n\r\n```bash\r\nvagrant ssh\r\n```\r\n\r\nCreate an example inventory and playbook:\r\n\r\n```bash\r\nmkdir windows-example\r\ncd windows-example\r\ncat \u003einventory.yml \u003c\u003c'EOF'\r\nall:\r\n  children:\r\n    example:\r\n      hosts:\r\n        192.168.192.123:\r\n  vars:\r\n    # connection configuration.\r\n    # see https://github.com/rgl/terraform-libvirt-ansible-windows-example/blob/master/README.md#windows-management\r\n    # see https://docs.ansible.com/ansible-core/2.14/collections/ansible/builtin/psrp_connection.html\r\n    ansible_user: vagrant\r\n    ansible_password: vagrant\r\n    ansible_connection: psrp\r\n    ansible_psrp_protocol: http\r\n    ansible_psrp_message_encryption: never\r\n    ansible_psrp_auth: credssp\r\n    # NB ansible does not yet support PowerShell 7.\r\n    #ansible_psrp_configuration_name: PowerShell.7 \r\nEOF\r\ncat \u003eansible.cfg \u003c\u003c'EOF'\r\n[defaults]\r\ninventory = inventory.yml\r\nstdout_callback = community.general.yaml\r\nEOF\r\ncat \u003eplaybook.yml \u003c\u003c'EOF'\r\n- hosts: example\r\n  gather_facts: false\r\n  tasks:\r\n    - name: Install Chocolatey\r\n      chocolatey.chocolatey.win_chocolatey:\r\n        name: chocolatey\r\n    - name: Install Notepad3\r\n      chocolatey.chocolatey.win_chocolatey:\r\n        name: notepad3\r\nEOF\r\n```\r\n\r\nKick the tires:\r\n\r\n```bash\r\nansible-lint --offline --parseable playbook.yml\r\nansible-inventory --list --yaml\r\nansible -m win_ping all\r\nansible -m gather_facts all\r\nansible -m win_command -a 'whoami /all' all\r\nansible -m win_shell -a '$PSVersionTable' all\r\nansible -m win_shell -a 'Get-PSSessionConfiguration' all\r\n```\r\n\r\nRun the playbook:\r\n\r\n```bash\r\nansible-playbook playbook.yml #-vvv\r\n```\r\n\r\n## Renovate\r\n\r\nList this repository dependencies (and which have newer versions):\r\n\r\n```bash\r\nexport GITHUB_COM_TOKEN='YOUR_GITHUB_PERSONAL_TOKEN'\r\n./renovate.sh\r\n```\r\n\r\n## Example Repositories\r\n\r\n* Packer/Ansible/Debian/Windows:\r\n  * https://github.com/rgl/packer-qemu-ansible-debian-example\r\n  * https://github.com/rgl/packer-qemu-ansible-windows-example\r\n  * https://github.com/rgl/debian-router-ansible-vagrant\r\n  * https://github.com/rgl/windows-router-ansible-vagrant\r\n* Azure:\r\n  * https://github.com/rgl/terraform-ansible-azure-vagrant\r\n  * https://github.com/rgl/terraform-azure-container-instances-vagrant\r\n  * https://github.com/rgl/terraform-azure-aks-example\r\n  * https://github.com/rgl/azure-ubuntu-vm\r\n  * https://github.com/rgl/azure-windows-vm\r\n  * https://github.com/rgl/azure-vpn-gateway-example\r\n* VMware vSphere:\r\n  * https://github.com/rgl/terraform-vsphere-ubuntu-example\r\n  * https://github.com/rgl/terraform-vsphere-windows-example\r\n* KVM/libvirt:\r\n  * https://github.com/rgl/debian-vagrant\r\n  * https://github.com/rgl/ubuntu-vagrant\r\n  * https://github.com/rgl/windows-vagrant\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgl%2Finfra-toolbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frgl%2Finfra-toolbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgl%2Finfra-toolbox/lists"}