{"id":21074205,"url":"https://github.com/hrafnthor/ansible-android-studio","last_synced_at":"2026-05-04T10:35:02.333Z","repository":{"id":180950388,"uuid":"580896179","full_name":"hrafnthor/ansible-android-studio","owner":"hrafnthor","description":"An Ansible role for installing Android Studio","archived":false,"fork":false,"pushed_at":"2024-03-11T12:33:03.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T03:27:26.023Z","etag":null,"topics":["android","android-studio","ansible","ansible-role","linux"],"latest_commit_sha":null,"homepage":"","language":null,"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/hrafnthor.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":"2022-12-21T18:20:57.000Z","updated_at":"2025-01-29T13:10:33.000Z","dependencies_parsed_at":"2025-06-25T21:35:47.380Z","dependency_job_id":null,"html_url":"https://github.com/hrafnthor/ansible-android-studio","commit_stats":null,"previous_names":["hrafnthor/ansible-android-studio"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hrafnthor/ansible-android-studio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrafnthor%2Fansible-android-studio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrafnthor%2Fansible-android-studio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrafnthor%2Fansible-android-studio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrafnthor%2Fansible-android-studio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrafnthor","download_url":"https://codeload.github.com/hrafnthor/ansible-android-studio/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrafnthor%2Fansible-android-studio/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261958081,"owners_count":23236397,"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":["android","android-studio","ansible","ansible-role","linux"],"created_at":"2024-11-19T19:14:59.384Z","updated_at":"2026-05-04T10:35:02.321Z","avatar_url":"https://github.com/hrafnthor.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Android Studio\n\nThis role can download and configure multiple Android Studio clients for use on a Linux machine.\n\n## Requirements\n\nThis role requires two separate tools be installed.\n\nFirst it requires the `ansible.utils` collection be installed from Ansible-Galaxy via:\n\n```bash\nansible-galaxy collection install ansible.utils\n```\n\nSecondly it requires the `jsonschema` Python package be installed via:\n\n```bash\npip install jsonschema\n```\n\n## Role Variables\n\nAll parameters are optional unless otherwise stated.\n\n```yaml\n\nandroid_studio:\n  clients:                      A list of version definitions to install or remove.\n    - version:  [string]            [required] The version number for the Android Studio client to install.\n      codename: [string]            See information below.\n      checksum: [string]            [required] The checksum for the version number archive being installed. See information below.\n      remove:   [bool]              If true, no archive will be downloaded and any client matching the 'version' value will be removed.\n      desktop:\n        name:   [string]        The name to use for the desktop entry. Defaults to 'Android Studio \u003cversion\u003e'\n        remove: [bool]          Indicates if the desktop entry should be removed\n        keywords: [array]       Array of strings to add to the desktop entry for search filtering.\n  location:                     Allows for configuration of installation location.\n    path:       [string]            Defines the installation path for new studio clients.\n    owner:      [string]            Defines the owner of the installation path, otherwise 'root'.\n    group:      [string]            Defines the group owning the installation path, otherwise the same as 'owner'.\n    mode:       [string]            Defines the mode for the installation path, otherwise '0755'\n  environment:                  Allows for configuration of environment variables.\n    remove:     [bool]              If true, removes the file containing the environment variables.\n    location:                       Allows for configuration of the environment file location.\n      path:     [string]                Defines the path to where the environment file is located.\n      owner:    [string]                Defines the owner of the environment file.\n      group:    [string]                Defines the groupowning the environment file, otherwise the same as 'owner'.\n    jdk_path:                   Allows for configuration of 'STUDIO_JDK' variable\n      value:    [string]            [required] The value to set\n      remove:   [bool]              If true, will remove the variable.\n    sdk_path:                   Allows for configuration of 'ANDROID_HOME' variable.\n      value:    [string]            [required] The value to set\n      remove:   [bool]              If true, will remove the variable.\n    preferences_path:           Allows for configuration of 'ANDROID_USER_HOME' variable.\n      value:    [string]            [required] The value to set\n      remove:   [bool]              If true, will remove the variable.\n    emulator_path:              Allows for configuration of 'ANDROID_EMULATOR_HOME' variable.\n      value:    [string]            [required] The value to set\n      remove:   [bool]              If true, will remove the variable.\n    avd_path:                   Allows for configuration of 'ANDROID_AVD_HOME' variable.\n      value:    [string]            [required] The value to set\n      remove:   [bool]              If true, will remove the variable.\n\n```\n\nFor version numbers and their associated checksums seem the archives [here](https://developer.android.com/studio/archive).\n\n##### Codename\n\nUsed if the remote artifact is named using a different codename than just the version.\n\nFor example if the version is named 'android-studio-panda2-canary1-linux.tar.gz' instead of 'android-studio-2025.3.1.5-linux.tar.gz' then the codename should be set to 'panda2-canary1'. Otherwise the version will be used.\n\nSee Google's own archive page (linked above) for details.\n\n### Defaults\n\nBy default the clients will be installed under `/opt/android/studio` as defined by the default variable `hth_android_studio_default_path`, unless the variable `android_studio.location.path` is given.\n\nBy default the location of the environment variables file is `/etc/profile.d/android.sh` as defined by the default variable `hth_android_studio_default_environment_path`, unless the variable `hth_android_studio.environment.location.path` is given.\n\nBy default all directories created will be owned by the user running the role, unless configured differently using variables such as `android_studio.location.owner | .group` or `android_studio.environment.location.owner | .group`. They are also given chmod `0755` by default.\n\nBy default the desktop file is placed at `/usr/share/applications` as defined by the default variable `hth_android_studio_default_desktop_file_path`.\n\nBy default the symlinks are placed in `/usr/bin` as defined by the default variable `hth_android_studio_default_symlink_path`, unless the variable `android_studio.(primary | canary).symlink.path` is given.\n\n\n## Dependencies\n\nNone.\n\n## Setup\n\nBefore the role can be used it needs to be added to the machine running the playbook, and as of writing this, this role is not hosted on Ansible-Galaxy only on Github.\n\n1. Create a `requirements.yml` file in the root directory of the playbook being worked on.\n\n2. Add the following definition inside the `requirements.yml` file:\n\n```yml\n- name: hth-android-studio\n  src: https://github.com/hrafnthor/ansible-android-studio.git\n  scm: git\n```\n\n3. Install the requirements by executing\n\n```shell\nansible-galaxy install -r .requirements.yml\n```\n\nThis will allow any playbook run from this machine to use the role `hth-android-studio`\n\n\n## Example Playbook\n\nThe following playbook installs two clients. Each is installed to the default location, but with guid `developers`. One client is configured as the primary studio client, while the other one is set as the canary client. Each are given custom descriptive names and keywords. The canary client is symlinked only for user `Hrafn`. The environment file is create only for user `Hrafn`, with one incorrect value being removed.\n\n\n```yaml\n- hosts: all\n    vars:\n      android_studio:\n        clients:\n          - version: \"2025.1.1.12\"\n            checksum: \"9aa40cdfd3de3c5616220ba4ccddd7e2b4c73d471dac54dcfce0bdc38b7ec093\"\n          - version: \"2025.1.2.6\"\n            checksum: \"04e529e084b3e5001d94420b1233967b2526bbf54755f82b4be02c08ca359fbd\"\n        primary:\n          version: \"2025.1.1.12\"\n          symlink:\n            name: \"astudio\"\n          desktop:\n            name: \"Primary\"\n            keywords:\n              - \"android\"\n              - \"studio\"\n              - \"primary\"\n        canary:\n          version: \"2025.1.2.6\"\n          symlink:\n            name: \"astudioc\"\n            path: \"/home/hrafn/.local/bin\"\n          desktop:\n            name: \"Canary\"\n            keywords:\n              - \"android\"\n              - \"studio\"\n              - \"canary\"\n        location:\n          group: \"developers\"\n          mode: \"2775\"\n        environment:\n          location:\n            path: \"/home/hrafn/.env.d\"\n            owner: \"hrafn\"\n            group: \"hrafn\"\n          jdk_path:\n            value: \"/tmp/not-correct-path/bin\"\n            remove: true\n          sdk_path:\n            value: \"/usr/lib/android/sdk\"\n          preferences_path:\n            value: \"$HOME/.android\"\n          emulator_path:\n            value: \"$HOME/.android/emulators\"\n          avd_path:\n            value: \"$HOME/.android/avd\"\n  roles:\n     - hth-android-studio\n```\n\n## License\n\n```\nCopyright 2025 Hrafn Thorvaldsson\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrafnthor%2Fansible-android-studio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrafnthor%2Fansible-android-studio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrafnthor%2Fansible-android-studio/lists"}