geerlingguy.ruby

Ansible Role: Ruby

CI

This role installs Ruby and the Bundler gem on a Linux system.

Requirements

No special requirements.

Role Variables

Here are the available settings for this role, including their default values (check defaults/main.yml for more details):

  • workspace: /root
    This is where temporary files are downloaded when preparing to install Ruby.

  • ruby_install_bundler: true
    This determines whether to install Bundler.

  • ruby_install_gems: []
    Specify a list of Ruby gems to install by name. This will install the latest version of each gem. For specific options, use another part of your playbook.

    You can provide detailed settings for each gem, like version and user installation, using a dictionary. For example:

    ruby_install_gems: - name: bundler version: '< 2' user_install: false You can mix simple names and detailed dictionaries for gems.

  • ruby_install_gems_user: username
    This is the user who will install Ruby gems. If not set, it defaults to the ansible_ssh_user.

  • ruby_install_from_source: false
    By default, this role installs the Ruby version available through your package manager (apt or yum). Set this to true to install a specific version or the latest release by adjusting ruby_download_url and ruby_version.

  • ruby_download_url: http://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0.tar.gz
    This is where Ruby will be downloaded from (used only if ruby_install_from_source is true).

  • ruby_version: 3.0.0
    The version of Ruby to install (used only if ruby_install_from_source is true).

  • ruby_source_configure_command: ./configure --enable-shared
    This command will be run during installation (used only if ruby_install_from_source is true).

  • ruby_rubygems_package_name: rubygems
    This is the name of the RubyGems package. It generally defaults to rubygems, but may switch to rubygems-integration on Ubuntu Trusty (14.04).

Dependencies

None.

Example Playbook

- hosts: server
  roles:
    - role: geerlingguy.ruby

License

MIT / BSD

Author Information

This role was created in 2014 by Jeff Geerling, the author of Ansible for DevOps.

Informazioni sul progetto

Ruby installation for Linux.

Installa
ansible-galaxy install geerlingguy.ruby
Licenza
mit
Download
666.4k
Proprietario
Father, author, developer, maker. Sometimes called "an inflammatory enigma". #stl #drupal #ansible #k8s #raspberrypi #crohns