community / community.general / 0.1.1 / module / gem Manage Ruby gems Authors: Ansible Core Team, Johan Wiren (@johanwiren) preview | supported by communitycommunity.general.gem (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
Manage installation and uninstallation of Ruby gems.
# 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
name: description: - The name of the gem to be managed. required: true force: default: 'no' description: - Force gem to install, bypassing dependency checks. required: false type: bool state: choices: - present - absent - latest default: present description: - The desired state of the gem. C(latest) ensures that the latest version is installed. required: false version: description: - Version of the gem to be installed/removed. required: false executable: description: - Override the path to the gem executable required: false gem_source: description: - The path to a local gem used as installation source. required: false repository: aliases: - source description: - The repository from which the gem will be installed required: false build_flags: description: - Allow adding build flags for gem compilation required: false env_shebang: default: 'no' description: - Rewrite the shebang line on installed scripts to use /usr/bin/env. required: false type: bool include_doc: default: 'no' description: - Install with or without docs. required: false type: bool install_dir: description: - Install the gems into a specific directory. These gems will be independent from the global installed ones. Specifying this requires user_install to be false. required: false pre_release: default: 'no' description: - Allow installation of pre-release versions of the gem. required: false type: bool user_install: default: 'yes' description: - Install gem in user's local gems cache or for all users required: false type: bool include_dependencies: default: 'yes' description: - Whether to include dependencies or not. required: false type: bool