community / community.general / 1.3.11 / module / bundler Manage Ruby Gem dependencies with Bundler Authors: Tim Hoiberg (@thoiberg)community.general.bundler (1.3.11) — module
Install with ansible-galaxy collection install community.general:==1.3.11
collections: - name: community.general version: 1.3.11
Manage installation and Gem version dependencies for Ruby using the Bundler gem
- 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
chdir: description: - 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 type: path clean: default: 'no' description: - Only applies if state is C(present). If set removes any gems on the target host that are not in the gemfile type: bool local: default: 'no' description: - If set only installs gems from the cache on the target host type: bool state: choices: - present - latest default: present description: - The desired state of the Gem bundle. C(latest) updates gems to the most recent, acceptable version type: str gemfile: description: - Only applies if state is C(present). The path to the gemfile to use to install gems. - If not specified it will default to the Gemfile in current directory type: path gem_path: description: - Only applies if state is C(present). Specifies the directory to install the gems into. If C(chdir) is set then this path is relative to C(chdir) - If not specified the default RubyGems gem paths will be used. type: path executable: description: - The path to the bundler executable type: str extra_args: description: - A space separated string of additional commands that can be applied to the Bundler command. Refer to the Bundler documentation for more information type: str user_install: default: 'yes' description: - Only applies if state is C(present). Installs gems in the local user's cache or for all users type: bool exclude_groups: description: - A list of Gemfile groups to exclude during operations. This only applies when state is C(present). Bundler considers this a 'remembered' property for the Gemfile and will automatically exclude groups in future operations even if C(exclude_groups) is not set elements: str type: list deployment_mode: default: 'no' description: - Only applies if state is C(present). If set it will install gems in ./vendor/bundle instead of the default location. Requires a Gemfile.lock file to have been created prior type: bool binstub_directory: description: - Only applies if state is C(present). Specifies the directory to install any gem bins files to. When executed the bin files will run within the context of the Gemfile and fail if any required gem dependencies are not installed. If C(chdir) is set then this path is relative to C(chdir) type: path