community.general.bundler – Manage Ruby Gem dependencies with Bundler
Note
This plugin is part of the community.general collection (version 3.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
.
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: yes
- 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
Authors
Tim Hoiberg (@thoiberg)