ansible / ansible.builtin / v2.9.27 / module / gem Manage Ruby gems | "added in version" 1.1 of ansible.builtin" Authors: Ansible Core Team, Johan Wiren (@johanwiren) preview | supported by communityansible.builtin.gem (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
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 version_added: '2.8' version_added_collection: ansible.builtin 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 version_added: '1.4' version_added_collection: ansible.builtin 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 version_added: '2.0' version_added_collection: ansible.builtin env_shebang: default: 'no' description: - Rewrite the shebang line on installed scripts to use /usr/bin/env. required: false type: bool version_added: '2.2' version_added_collection: ansible.builtin include_doc: default: 'no' description: - Install with or without docs. required: false type: bool version_added: '2.0' version_added_collection: ansible.builtin 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 version_added: '2.6' version_added_collection: ansible.builtin pre_release: default: 'no' description: - Allow installation of pre-release versions of the gem. required: false type: bool version_added: '1.6' version_added_collection: ansible.builtin user_install: default: 'yes' description: - Install gem in user's local gems cache or for all users required: false type: bool version_added: '1.3' version_added_collection: ansible.builtin include_dependencies: default: 'yes' description: - Whether to include dependencies or not. required: false type: bool