Skip to content

Commit

Permalink
improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriiKhomik committed Dec 11, 2024
1 parent 3436b16 commit 80d6d0f
Showing 1 changed file with 25 additions and 29 deletions.
54 changes: 25 additions & 29 deletions ansible1/roles/packages/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,34 +59,30 @@
mode: 644

# Install Bundler and configured gems
# - name: Install Bundler
# gem:
# name: bundler
# state: present
# user_install: false
# when: ruby_install_bundler

# - name: Install configured gems
# gem:
# name: "{{ item.name | default(item) }}"
# version: "{{ item.version | default(omit) }}"
# user_install: false
# state: present
# become: true
# become_user: "{{ ruby_install_gems_user }}"
# with_items: "{{ ruby_install_gems }}"
- name: Install Bundler
gem:
name: bundler
state: present
user_install: false
when: ruby_install_bundler

# - name: Install development gems
# gem:
# name: "{{ item.name }}"
# version: "{{ item.version | default(omit) }}"
# user_install: false
# with_items:
# - { name: "pry-rails" }
# - { name: "letter_opener" }
# - { name: "web-console", version: ">= 4.1.0" }
# when: ruby_install_gems_development
- name: Install configured gems
gem:
name: "{{ item.name | default(item) }}"
version: "{{ item.version | default(omit) }}"
user_install: false
state: present
become: true
become_user: "{{ ruby_install_gems_user }}"
with_items: "{{ ruby_install_gems }}"

- name: Install all nessessary dependencies via bundle
shell: |
sudo bundle install
- name: Install development gems
gem:
name: "{{ item.name }}"
version: "{{ item.version | default(omit) }}"
user_install: false
with_items:
- { name: "pry-rails" }
- { name: "letter_opener" }
- { name: "web-console", version: ">= 4.1.0" }
when: ruby_install_gems_development

0 comments on commit 80d6d0f

Please sign in to comment.