community.general.bundler module – Manage Ruby Gem dependencies with Bundler
Note
This module is part of the community.general collection (version 5.8.3).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.bundler
.
Synopsis
Manage installation and Gem version dependencies for Ruby using the Bundler gem
Parameters
Parameter |
Comments |
---|---|
Only applies if state is |
|
The directory to execute the bundler commands from. This directory needs to contain a valid Gemfile or .bundle/ directory If not specified, it will default to the temporary working directory |
|
Only applies if state is Choices:
|
|
Only applies if state is Choices:
|
|
A list of Gemfile groups to exclude during operations. This only applies when state is |
|
The path to the bundler executable |
|
A space separated string of additional commands that can be applied to the Bundler command. Refer to the Bundler documentation for more information |
|
Only applies if state is If not specified the default RubyGems gem paths will be used. |
|
Only applies if state is If not specified it will default to the Gemfile in current directory |
|
If set only installs gems from the cache on the target host Choices:
|
|
The desired state of the Gem bundle. Choices:
|
|
Only applies if state is Choices:
|
Examples
- name: Install gems from a Gemfile in the current directory
community.general.bundler:
state: present
executable: ~/.rvm/gems/2.1.5/bin/bundle
- name: Exclude the production group from installing
community.general.bundler:
state: present
exclude_groups: production
- name: Install gems into ./vendor/bundle
community.general.bundler:
state: present
deployment_mode: true
- name: Install gems using a Gemfile in another directory
community.general.bundler:
state: present
gemfile: ../rails_project/Gemfile
- name: Update Gemfile in another directory
community.general.bundler:
state: latest
chdir: ~/rails_project
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication