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) }}"