From 344bf820795f3701e121ea8aed079194924116b9 Mon Sep 17 00:00:00 2001 From: nightcityblade Date: Thu, 9 Jul 2026 23:11:30 +0800 Subject: [PATCH] fix: declare the community.general requirement --- README.md | 3 ++- tasks/main.yml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 12c1eff..af12a69 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ Installs Ruby and bundler gem on Linux. ## Requirements -None. +If you are running this role with `ansible-core`, install the +`community.general` collection first so the `gem` module is available. ## Role Variables diff --git a/tasks/main.yml b/tasks/main.yml index e73f56e..4345170 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -30,14 +30,14 @@ # Install Bundler and configured gems. - name: Install Bundler. - gem: + community.general.gem: name: bundler state: present user_install: false when: ruby_install_bundler - name: Install configured gems. - gem: + community.general.gem: name: "{{ item.name | default(item) }}" version: "{{ item.version | default(omit) }}" user_install: "{{ item.user_install | default(omit) }}"