{"id":29671462,"url":"https://github.com/linkorb/polaris-local-inventory","last_synced_at":"2026-03-05T23:35:09.941Z","repository":{"id":201218484,"uuid":"694100397","full_name":"linkorb/polaris-local-inventory","owner":"linkorb","description":"A Polaris Inventory composed of Multipass VMs","archived":false,"fork":false,"pushed_at":"2025-08-18T12:33:36.000Z","size":85,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-10-04T16:31:18.723Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/linkorb.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-09-20T10:31:08.000Z","updated_at":"2025-08-18T12:33:41.000Z","dependencies_parsed_at":"2023-10-30T21:25:49.375Z","dependency_job_id":"42b8d0ce-0fbc-4a1f-bdbf-955aeb540ed3","html_url":"https://github.com/linkorb/polaris-local-inventory","commit_stats":null,"previous_names":["linkorb/ansible-x-polaris"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/linkorb/polaris-local-inventory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Fpolaris-local-inventory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Fpolaris-local-inventory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Fpolaris-local-inventory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Fpolaris-local-inventory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linkorb","download_url":"https://codeload.github.com/linkorb/polaris-local-inventory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Fpolaris-local-inventory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30155449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"ssl_error","status_checked_at":"2026-03-05T22:39:24.771Z","response_time":93,"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":[],"created_at":"2025-07-22T20:08:15.184Z","updated_at":"2026-03-05T23:35:09.899Z","avatar_url":"https://github.com/linkorb.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# polaris-local-inventory\n\nLocal, development version of Polaris Infrastructure-as-Code.\n\nThe playbook in this repo is intended to be used with Ubuntu Multipass to spin\nup a pre-defined Inventory.  For each of the hosts in such an inventory, Ansible\nwill:\n\n- create a Multipass VM with the name given in the inventory\n- add an \"ansible\" user that has SSH access to the VM\n- learn the VMs IP address and store it in the in-memory inventory so that\n  Ansible can run tasks on it\n\nYou can see how this is achieved by reviewing the below-listed files:\n\n- [make-multipass-inventory.yaml](make-multipass-inventory.yaml)\n- [templates/cloud-init.yaml.j2](templates/cloud-init.yaml.j2)\n\n## Prerequisites\n\n- [Multipass](https://multipass.run)\n- [Git](https://git-scm.com/)\n- python3-pip (apt package)\n- [Ansible \u003e= 2.16.3](https://www.ansible.com/)\n- [jsonschema (PIP package)](https://pypi.org/project/jsonschema/)\n- [SOPS: Secrets OPeration](https://github.com/getsops/sops)\n- GitHub [classic Personal Access Token (PAT)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic) with `read:packages` scope.\n\n## Usage\n\nIn brief:\n\n 1. Clone this repo.\n 2. Install dependencies.\n 3. Define polaris collection variables.\n 4. Run the \"site.yaml\" playbook.\n\n### Clone this repo\n\nClone the repo and submodules in one go:\n\n```shell\ngit clone --recurse-submodules https://github.com/linkorb/polaris-local-inventory.git\n```\n\nor, as distinct steps:\n\n```shell\ngit clone https://github.com/linkorb/polaris-local-inventory.git\ngit submodule update --init --recursive\n```\n\nThe `polaris` submodule tracks the `chartless` branch of linkorb/ansible-collection-polaris and is mounted in the\n***collections/ansible_collections/linkorb/polaris/*** folder. To configure a different branch, run:\n\n```shell\ngit config -f .gitmodules submodule.polaris.branch some-other-branch\n```\n\nThe `shipyard.charts` submodule has been removed because it is no longer needed.\n\n### Install dependencies\n\n```shell\nansible-galaxy install -r requirements.yaml \\\n\u0026\u0026 pip3 install jsonschema\n```\n\n### Define your group variables and secrets\n\nEdit ***group_vars/polaris_hosts/restricted-vars.yaml*** fill out the required variables:\n\n```yaml\n# Quickstart polaris variables definition. Review ansible-collection-polaris for an up to date list\npolaris_docker_registry_username: your_github_username\npolaris_docker_registry_pat: ghc_classic_personal_token_for_container_registry_access\n```\n\n\u003e [!NOTE]\n\u003e For an up-to-date reference of the variables required by the LinkORB's Polaris collection,\n\u003e review the [README.md](https://github.com/linkorb/ansible-collection-polaris#readme) or\n\u003e consult the [variables schema definition](https://github.com/linkorb/ansible-collection-polaris/blob/main/variables.schema.yaml).\n\n\n### Generate a TLS key and certificate\n\n1. For testing purposes, generate a self-signed certificate for the `whoami.local` domain:\n\n   ```shell\n   openssl req -x509 -newkey rsa:4096 \\\n   -keyout key.pem \\\n   -out cert.pem \\\n   -sha256 -days 3650 -nodes \\\n   -subj \"/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=whoami.local\"\n   ```\n\n2. To encrypt the TLS certificate and key files in-place using SOPS, run:\n\n   ```shell\n   sops --encrypt --in-place cert.pem \\\n   \u0026\u0026 sops --encrypt --in-place key.pem\n   ```\n\n### Run the playbook\n\nRun `ansible-playbook -i inventory.yaml site.yaml`.\n\nYour inventory will be realised as multipass VMs during the first steps of the\n\"site\" playbook.  The IP addresses of the VMs will be collected when the VMs are\nup-and-running.  The remainder of the playbook will run when Ansible can connect\nto those IP addresses.\n\n## Development\n\n### Developing a standalone Play\n\nA standalone play should be written with the assumption that the Inventory is\nup and running (the hosts are reachable).  During development, when the hosts\nare Multipass VMs, you should import the tasks/update-multipass-inventory.yaml\ninto the beginning of a standalone playbook.  These tasks will learn the IP\naddress of the multipass VMs so that Ansible can connect to them during\nexecution of your play.  The ***[site.yaml](site.yaml)*** playbook already does this.\n\n## Files in this repo\n\n- [ansible.cfg](ansible.cfg): Ansible configuration for the development environment.\n\n- [inventory.yaml](inventory.yaml): The Inventory of hosts managed by Ansible.\n\n- [collections/ansible_collections/linkorb/polaris](collections/ansible_collections/linkorb/polaris): The polaris collection as\n  a git submodule.\n\n- [example-site.yaml](example-site.yaml): An example playbook.\n\n- [site.yaml](site.yaml): The main playbook. You have to run `ansible-playbook site.yaml`.\n\n- [make-multipass-inventory.yaml](make-multipass-inventory.yaml): A top-level playbook that realises the\n  Inventory as Multipass VMs.\n\n- [prepare-multipass-inventory.yaml](prepare-multipass-inventory.yaml): A top-level playbook to prepare the fresh\n  VMs.\n\n- [stacks/manifest.yaml](stacks/manifest.yaml): The manifest of stacks.\n\n- [stacks/](stacks/): The stacks.\n\n- [tasks/](tasks/): Tasks imported into top-level playbooks.\n\n- [templates/](templates/): Templates used by the top-level playbooks.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkorb%2Fpolaris-local-inventory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinkorb%2Fpolaris-local-inventory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkorb%2Fpolaris-local-inventory/lists"}