community.general.bundler – Manage Ruby Gem dependencies with Bundler
community.general.bundler – Manage Ruby Gem dependencies with Bundler
Note
This plugin is part of the community.general collection (version 2.0.1).
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 | Choices/Defaults | Comments |
---|---|---|
binstub_directory path |
Only applies if state is | |
chdir path |
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 | |
clean boolean |
|
Only applies if state is |
deployment_mode boolean |
|
Only applies if state is |
exclude_groups list / elements=string |
A list of Gemfile groups to exclude during operations. This only applies when state is | |
executable string |
The path to the bundler executable | |
extra_args string |
A space separated string of additional commands that can be applied to the Bundler command. Refer to the Bundler documentation for more information | |
gem_path path |
Only applies if state is If not specified the default RubyGems gem paths will be used. | |
gemfile path |
Only applies if state is If not specified it will default to the Gemfile in current directory | |
local boolean |
|
If set only installs gems from the cache on the target host |
state string |
|
The desired state of the Gem bundle. |
user_install boolean |
|
Only applies if state is |
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)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/general/bundler_module.html