{"id":19308732,"url":"https://github.com/mtulio/ansible-role-cloud-compute","last_synced_at":"2026-03-19T09:12:38.952Z","repository":{"id":36982894,"uuid":"448295905","full_name":"mtulio/ansible-role-cloud-compute","owner":"mtulio","description":"Ansible Role to manager Compute Resources","archived":false,"fork":false,"pushed_at":"2023-08-04T14:31:11.000Z","size":49,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-16T09:20:35.872Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jinja","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/mtulio.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}},"created_at":"2022-01-15T14:11:36.000Z","updated_at":"2022-06-20T02:18:15.000Z","dependencies_parsed_at":"2025-01-06T01:28:05.336Z","dependency_job_id":"969d63f9-1eee-4d48-80a6-c07510443f55","html_url":"https://github.com/mtulio/ansible-role-cloud-compute","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/mtulio/ansible-role-cloud-compute","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtulio%2Fansible-role-cloud-compute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtulio%2Fansible-role-cloud-compute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtulio%2Fansible-role-cloud-compute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtulio%2Fansible-role-cloud-compute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtulio","download_url":"https://codeload.github.com/mtulio/ansible-role-cloud-compute/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtulio%2Fansible-role-cloud-compute/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29958394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T01:47:18.291Z","status":"online","status_checked_at":"2026-03-01T02:00:07.437Z","response_time":124,"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":[],"created_at":"2024-11-10T00:16:16.854Z","updated_at":"2026-03-01T02:02:02.317Z","avatar_url":"https://github.com/mtulio.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansible-role-cloud-compute\n\n[![](https://github.com/mtulio/ansible-role-cloud-compute/actions/workflows/release.yml/badge.svg)](https://github.com/mtulio/ansible-role-cloud-compute/actions/workflows/release.yml)\n[![](https://github.com/mtulio/ansible-role-cloud-compute/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/mtulio/ansible-role-cloud-compute/actions/workflows/ci.yml)\n[![](https://img.shields.io/ansible/role/59505)](https://galaxy.ansible.com/mtulio/cloud_compute)\n\nAnsible Role to manage cloud compute resources.\n\nRequirements\n------------\n\n* ansible \u003e= 2.10\n\nProvider=AWS:\n\n* boto3\n\n\nRole Variables\n--------------\n\n`compute_resources`: List of compute resources to be created. Only `machine` is supported.\n\n\u003c!--\n\nDependencies\n------------\n\n\u003e TBD\n\n--\u003e\n\n\nUsage Examples\n--------------\n\n### Provider: AWS\n\n- Install Dependencies\n\n```bash\npip3 install boto3\nansible-galaxy install collection community.aws\nansible-galaxy install collection amazon.aws\n```\n\n- Create the playbook file `create.yaml` to create EC2 Instance on AWS:\n\n```yaml\n- hosts: localhost\n  vars:\n    compute_resources:\n      - provider: \"aws\"\n        type: machine\n        user_data: \"\"\n        vpc_subnet_id: \"subnet-1234567\"\n        instance_type: m5.xlarge\n        image_id: ami-123456789\n        filters:\n          tag:Name: \"{{ name }}\"\n          instance-state-name: running\n        tags:\n          Name: \"{{ name }}\"\n\n  roles:\n    - role: mtulio.cloud-compute\n```\n\n- Run the Playbook:\n\n```bash\nansible-playbook create.yaml -e provider=aws -e name=my-machine\n```\n\n### Provider: Digital Ocean\n\n- Install Dependencies\n\n```bash\nansible-galaxy collection install community.digitalocean\n```\n\n- Export variables\n\n```bash\nexport SSH_KEY=$(cat ~/.ssh/id_rsa.pub)\n```\n\n- Create the Playbook\n```yaml\n- hosts: localhost\n  vars:\n    compute_resources:\n      # Module 'machine' options:\n      - provider: do\n        type: machine\n        name: \"{{ name }}\"\n        state: present\n        user_data: \"\u003cCHANGE_ME_USERDATA\u003e\"\n        vpc_name: \"my-vpc-name\"\n        wait: \"yes\"\n        wait_timeout: 500\n        image_name: \"fedora-coreos-34.20210626.3.1-digitalocean.x86_64.qcow2.gz\"\n        private_networking: yes\n        project_name: \"my-project\"\n        region: \"NYC3\"\n        size: \"s-4vcpu-8gb\"\n        ssh_key:\n          name: \"my-key\"\n          pub_key: \"{{ lookup('ansible.builtin.env', 'SSH_KEY') }}\"\n\n  roles:\n    - role: mtulio.cloud-compute\n```\n\n- Run the Playbook:\n\n```bash\nansible-playbook create.yaml -e provider=do -e name=my-machine\n```\n\nLicense\n-------\n\nApache v2\n\nAuthor Information\n------------------\n\n[Marco Tulio R Braga](https://github.com/mtulio)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtulio%2Fansible-role-cloud-compute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtulio%2Fansible-role-cloud-compute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtulio%2Fansible-role-cloud-compute/lists"}