gem - Manage Ruby gems

Author:Johan Wiren

Synopsis

New in version 1.1.

Manage installation and uninstallation of Ruby gems.

Options

parameter required default choices comments
executable no
    Override the path to the gem executable (added in Ansible 1.4)
    gem_source no
      The path to a local gem used as installation source.
      include_dependencies no yes
      • yes
      • no
      Wheter to include dependencies or not.
      name yes
        The name of the gem to be managed.
        repository no
          The repository from which the gem will be installed
          state yes
          • present
          • absent
          • latest
          The desired state of the gem. latest ensures that the latest version is installed.
          user_install no yes
            Install gem in user's local gems cache or for all users (added in Ansible 1.3)
            version no
              Version of the gem to be installed/removed.

              Examples


              # Installs version 1.0 of vagrant.
              - gem: name=vagrant version=1.0 state=present
              
              # Installs latest available version of rake.
              - gem: name=rake state=latest
              
              # Installs rake version 1.0 from a local gem on disk.
              - gem: name=rake gem_source=/path/to/gems/rake-1.0.gem state=present
              

              Table Of Contents

              Previous topic

              easy_install - Installs Python libraries

              Next topic

              homebrew - Package manager for Homebrew