{"id":13654997,"url":"https://github.com/rvm/rvm1-ansible","last_synced_at":"2025-04-05T12:08:51.815Z","repository":{"id":16653102,"uuid":"19408536","full_name":"rvm/rvm1-ansible","owner":"rvm","description":"The official ansible RVM role to install and manage your Ruby versions.","archived":false,"fork":false,"pushed_at":"2022-11-04T18:11:09.000Z","size":192,"stargazers_count":273,"open_issues_count":36,"forks_count":137,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-03-29T11:11:23.802Z","etag":null,"topics":["ansible","ansible-role","ruby","rvm"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/rvm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2014-05-03T17:42:26.000Z","updated_at":"2024-12-31T10:23:05.000Z","dependencies_parsed_at":"2022-09-16T02:41:11.919Z","dependency_job_id":null,"html_url":"https://github.com/rvm/rvm1-ansible","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvm%2Frvm1-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvm%2Frvm1-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvm%2Frvm1-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvm%2Frvm1-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rvm","download_url":"https://codeload.github.com/rvm/rvm1-ansible/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332612,"owners_count":20921853,"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-role","ruby","rvm"],"created_at":"2024-08-02T03:00:54.481Z","updated_at":"2025-04-05T12:08:51.795Z","avatar_url":"https://github.com/rvm.png","language":"Dockerfile","funding_links":["https://opencollective.com/rvm","https://opencollective.com/rvm/backer/0/website","https://opencollective.com/rvm/backer/1/website","https://opencollective.com/rvm/backer/2/website","https://opencollective.com/rvm/backer/3/website","https://opencollective.com/rvm/backer/4/website","https://opencollective.com/rvm/backer/5/website","https://opencollective.com/rvm/backer/6/website","https://opencollective.com/rvm/backer/7/website","https://opencollective.com/rvm/backer/8/website","https://opencollective.com/rvm/backer/9/website","https://opencollective.com/rvm/backer/10/website","https://opencollective.com/rvm/backer/11/website","https://opencollective.com/rvm/backer/12/website","https://opencollective.com/rvm/backer/13/website","https://opencollective.com/rvm/backer/14/website","https://opencollective.com/rvm/backer/15/website","https://opencollective.com/rvm/backer/16/website","https://opencollective.com/rvm/backer/17/website","https://opencollective.com/rvm/backer/18/website","https://opencollective.com/rvm/backer/19/website"],"categories":["Dockerfile","Ansible roles"],"sub_categories":["Languages"],"readme":"[![Build Status](https://github.com/rvm/rvm1-ansible/actions/workflows/tests.yml/badge.svg)](https://github.com/rvm/rvm1-ansible/actions/workflows/tests.yml)\n[![OpenCollective](https://opencollective.com/rvm/backers/badge.svg)](#backers)\n[![OpenCollective](https://opencollective.com/rvm/sponsors/badge.svg)](#sponsors)\n[![Ansible Role](https://img.shields.io/badge/role-rvm_io-red)](https://galaxy.ansible.com/rvm/ruby)\n[![Ansible Role Downloads](https://img.shields.io/ansible/role/d/30318)](https://galaxy.ansible.com/rvm/ruby)\n\n## What is rvm1-ansible?\n\nIt is an [Ansible](http://www.ansible.com/home) role to install and manage ruby versions using rvm.\n\n### Why should you use rvm?\n\nIn production it's useful because compiling a new version of ruby can easily\ntake upwards of 10 minutes. That's 10 minutes of your CPU being pegged at 100%.\n\nrvm has pre-compiled binaries for a lot of operating systems. That means you can\ninstall ruby in about 1 minute, even on a slow micro instance.\n\nThis role even adds the ruby binaries to your system path when doing a system\nwide install. This allows you to access them as if they were installed without\nusing a version manager while still benefiting from what rvm has to offer.\n\n## Installation\n\n`$ ansible-galaxy install rvm.ruby`\n\n## Role variables\n\nBelow is a list of default values that you can configure:\n\n```yaml\n---\n\n# Install 1 or more versions of ruby\n# The last ruby listed will be set as the default ruby\nrvm1_rubies:\n  - 'ruby-2.3.1'\n\n# Install the bundler gem\nrvm1_bundler_install: True\n\n# Delete a specific version of ruby (ie. ruby-2.1.0)\nrvm1_delete_ruby:\n\n# Install path for rvm (defaults to single user)\n# NOTE: If you are doing a ROOT BASED INSTALL then make sure you\n#       set the install path to something like '/usr/local/rvm'\nrvm1_install_path: '~/.rvm'\n\n# Add or remove any install flags\n# NOTE: If you are doing a ROOT BASED INSTALL then\n#       make sure you REMOVE the --user-install flag below\nrvm1_install_flags: '--auto-dotfiles  --user-install'\n\n# Add additional ruby install flags\nrvm1_ruby_install_flags:\n\n# Set the owner for the rvm directory\n# NOTE: If you are doing a ROOT BASED INSTALL then\n#       make sure you set rvm1_user to 'root'\nrvm1_user: 'ubuntu'\n\n# URL for the latest installer script\nrvm1_rvm_latest_installer: 'https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer'\n\n# rvm version to use\nrvm1_rvm_version: 'stable'\n\n# Check and update rvm, disabling this will force rvm to never update\nrvm1_rvm_check_for_updates: True\n\n# GPG key verification, use an empty string if you want to skip this\n# Note: Unless you know what you're doing, just keep it as is\n#           Identity proof: https://keybase.io/mpapis\n#           PGP message: https://rvm.io/mpapis.asc\nrvm1_gpg_keys: '409B6B1796C275462A1703113804BB82D39DC0E3'\n\n# The GPG key server\nrvm1_gpg_key_server: 'hkp://keys.openpgp.org'\n\n# autolib mode, see https://rvm.io/rvm/autolibs\nrvm1_autolib_mode: 3\n\n# Symlink binaries to system path\nrvm1_symlink: true\n```\n\n## Example playbooks\n\n```yaml\n---\n\n- name: Configure servers with ruby support for single user\n  hosts: all\n\n  roles:\n    - { role: rvm.ruby,\n        tags: ruby,\n        rvm1_rubies: ['ruby-2.3.1'],\n        rvm1_user: 'ubuntu'\n      }\n```\n\nIf you need to pass a list of ruby versions, pass it in an array like so.\n\n```yaml\n---\n- name: Configure servers with ruby support system wide\n  hosts: all\n  roles:\n    - { role: rvm.ruby,\n        tags: ruby,\n        become: yes,\n\n        rvm1_rubies: ['ruby-2.2.5','ruby-2.3.1'],\n        rvm1_install_flags: '--auto-dotfiles',     # Remove --user-install from defaults\n        rvm1_install_path: /usr/local/rvm,         # Set to system location\n        rvm1_user: root                            # Need root account to access system location\n      }\n```\n_rvm_rubies must be specified via `ruby-x.x.x` so that if you want_\n_ruby 2.2.5, you will need to pass in an array **rvm_rubies: ['ruby-2.2.5']**_\n\n\n#### System wide installation\n\nThe above example would setup ruby system wide. It's very important that you run the\nplay as root because it will need to write to a system location specified by rvm1_install_path\n\n#### To the same user as `ansible_user`\n\nIn this case, just overwrite `rvm_install_path` and by default is set the `--user-install` flag:\n\n```yaml\nrvm1_install_flags: '--auto-dotfiles --user-install'\nrvm1_install_path: '/home/{{ ansible_user }}/.rvm'\n```\n\n#### To a user that is not `ansible_user`\n\nYou **will need root access here** because you will be writing outside the ansible\nuser's home directory. Other than that it's the same as above, except you will\nsupply a different user account:\n\n```yaml\nrvm1_install_flags: '--auto-dotfiles --user-install'\nrvm1_install_path: '/home/someuser/.rvm'\n```\n\n#### Quick notes about `rvm1_user`\n\nIn some cases you may want the rvm folder and its files to be owned by a specific\nuser instead of root. Simply set `rvm1_user: 'foo'` and when ruby gets installed\nit will ensure that `foo` owns the rvm directory.\n\nThis would use Ansible's `become` under the hood. In case of failures (e.g. `Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user`), check https://docs.ansible.com/ansible/latest/user_guide/become.html for details and possible solutions.\n\n## Upgrading and removing old versions of ruby\n\nA common work flow for upgrading your ruby version would be:\n\n1. Install the new version\n2. Run your application role so that bundle install re-installs your gems\n3. Delete the previous version of ruby\n\n### Leverage ansible's `--extra-vars`\n\nJust add `--extra-vars 'rvm1_delete_ruby=ruby-2.1.0'` to the end of your play book command and that version will be removed.\n\n## Requirements\n\nPotentially, any Linux/Unix system supported by Ansible and satisfying the [RVM prerequisites](https://rvm.io/rvm/prerequisites) should work.\n\nCompatibility with Linux distributions based on Debian, Ubuntu or Redhat families is actively tested.\n\nThe continuous integration setup of this project currently covers following platforms:\n- CentOS 6, 7 and 8\n- Debian 8, 9 and 10\n- Ubuntu 14.04, 16.04, 18.04 and 20.04\n\n## Ansible galaxy\n\nYou can find it on the official [ansible galaxy](https://galaxy.ansible.com/rvm/ruby) if you want to rate it.\n\n## Contributing\n\n### Backers\n\n[Become a backer](https://opencollective.com/rvm#backer) and support us with a small monthly donation to help us continue our activities.\n\n[![Backer](https://opencollective.com/rvm/backer/0/avatar.svg)](https://opencollective.com/rvm/backer/0/website)\n[![Backer](https://opencollective.com/rvm/backer/1/avatar.svg)](https://opencollective.com/rvm/backer/1/website)\n[![Backer](https://opencollective.com/rvm/backer/2/avatar.svg)](https://opencollective.com/rvm/backer/2/website)\n[![Backer](https://opencollective.com/rvm/backer/3/avatar.svg)](https://opencollective.com/rvm/backer/3/website)\n[![Backer](https://opencollective.com/rvm/backer/4/avatar.svg)](https://opencollective.com/rvm/backer/4/website)\n[![Backer](https://opencollective.com/rvm/backer/5/avatar.svg)](https://opencollective.com/rvm/backer/5/website)\n[![Backer](https://opencollective.com/rvm/backer/6/avatar.svg)](https://opencollective.com/rvm/backer/6/website)\n[![Backer](https://opencollective.com/rvm/backer/7/avatar.svg)](https://opencollective.com/rvm/backer/7/website)\n[![Backer](https://opencollective.com/rvm/backer/8/avatar.svg)](https://opencollective.com/rvm/backer/8/website)\n[![Backer](https://opencollective.com/rvm/backer/9/avatar.svg)](https://opencollective.com/rvm/backer/9/website)\n[![Backer](https://opencollective.com/rvm/backer/10/avatar.svg)](https://opencollective.com/rvm/backer/10/website)\n[![Backer](https://opencollective.com/rvm/backer/11/avatar.svg)](https://opencollective.com/rvm/backer/11/website)\n[![Backer](https://opencollective.com/rvm/backer/12/avatar.svg)](https://opencollective.com/rvm/backer/12/website)\n[![Backer](https://opencollective.com/rvm/backer/13/avatar.svg)](https://opencollective.com/rvm/backer/13/website)\n[![Backer](https://opencollective.com/rvm/backer/14/avatar.svg)](https://opencollective.com/rvm/backer/14/website)\n[![Backer](https://opencollective.com/rvm/backer/15/avatar.svg)](https://opencollective.com/rvm/backer/15/website)\n[![Backer](https://opencollective.com/rvm/backer/16/avatar.svg)](https://opencollective.com/rvm/backer/16/website)\n[![Backer](https://opencollective.com/rvm/backer/17/avatar.svg)](https://opencollective.com/rvm/backer/17/website)\n[![Backer](https://opencollective.com/rvm/backer/18/avatar.svg)](https://opencollective.com/rvm/backer/18/website)\n[![Backer](https://opencollective.com/rvm/backer/19/avatar.svg)](https://opencollective.com/rvm/backer/19/website)\n\n### Sponsors\n\n[Become a sponsor](https://opencollective.com/rvm#sponsor) and get your logo on our README on Github with a link to your site.\n\n[![Sponsor](https://opencollective.com/rvm/sponsor/0/avatar.svg)](https://opencollective.com/rvm/sponsor/0/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/1/avatar.svg)](https://opencollective.com/rvm/sponsor/1/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/2/avatar.svg)](https://opencollective.com/rvm/sponsor/2/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/3/avatar.svg)](https://opencollective.com/rvm/sponsor/3/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/4/avatar.svg)](https://opencollective.com/rvm/sponsor/4/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/5/avatar.svg)](https://opencollective.com/rvm/sponsor/5/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/6/avatar.svg)](https://opencollective.com/rvm/sponsor/6/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/7/avatar.svg)](https://opencollective.com/rvm/sponsor/7/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/8/avatar.svg)](https://opencollective.com/rvm/sponsor/8/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/9/avatar.svg)](https://opencollective.com/rvm/sponsor/9/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/10/avatar.svg)](https://opencollective.com/rvm/sponsor/10/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/11/avatar.svg)](https://opencollective.com/rvm/sponsor/11/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/12/avatar.svg)](https://opencollective.com/rvm/sponsor/12/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/13/avatar.svg)](https://opencollective.com/rvm/sponsor/13/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/14/avatar.svg)](https://opencollective.com/rvm/sponsor/14/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/15/avatar.svg)](https://opencollective.com/rvm/sponsor/15/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/16/avatar.svg)](https://opencollective.com/rvm/sponsor/16/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/17/avatar.svg)](https://opencollective.com/rvm/sponsor/17/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/18/avatar.svg)](https://opencollective.com/rvm/sponsor/18/website)\n[![Sponsor](https://opencollective.com/rvm/sponsor/19/avatar.svg)](https://opencollective.com/rvm/sponsor/19/website)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvm%2Frvm1-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frvm%2Frvm1-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvm%2Frvm1-ansible/lists"}