Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify shell command usage to bash #121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tasks/system_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
changed_when: '"changed from" in rbenv_chmod.stdout'

- name: check ruby versions installed for system
shell: $SHELL -lc "rbenv versions --bare"
shell: bash -lc "rbenv versions --bare"
register: rbenv_versions
with_items: rbenv.rubies
changed_when: false
Expand Down Expand Up @@ -88,14 +88,14 @@
ignore_errors: yes

- name: remove old rubies
shell: $SHELL -lc "rm -rf {{ rbenv_root }}/versions/{{ ansible_facts.drop_ruby }}"
shell: bash -lc "rm -rf {{ rbenv_root }}/versions/{{ ansible_facts.drop_ruby }}"
changed_when: false
become: yes
when: rbenv_clean_up
ignore_errors: yes

- name: check if current system ruby version is {{ rbenv.default_ruby }}
shell: $SHELL -lc "rbenv version | cut -d ' ' -f 1 | grep -Fx '{{ rbenv.default_ruby }}'"
shell: bash -lc "rbenv version | cut -d ' ' -f 1 | grep -Fx '{{ rbenv.default_ruby }}'"
register: ruby_selected
changed_when: false
ignore_errors: yes
Expand Down
10 changes: 5 additions & 5 deletions tasks/user_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
ignore_errors: yes

- name: check ruby versions installed for select users
shell: $SHELL -lc "{{ rbenv_root }}/bin/rbenv versions --bare"
shell: bash -lc "{{ rbenv_root }}/bin/rbenv versions --bare"
with_items: "{{ rbenv_users }}"
become: yes
become_user: "{{ item }}"
Expand All @@ -88,7 +88,7 @@
check_mode: no

- name: install ruby {{ item[1].version }} for select users
shell: $SHELL -lc "{{ rbenv_root }}/bin/rbenv install --skip-existing {{ item[1].version }}"
shell: bash -lc "{{ rbenv_root }}/bin/rbenv install --skip-existing {{ item[1].version }}"
become: yes
become_user: "{{ item[0] }}"
with_nested:
Expand Down Expand Up @@ -116,7 +116,7 @@
ignore_errors: yes

- name: remove old rubies
shell: $SHELL -lc "rm -rf {{ rbenv_root }}/versions/{{ item.ansible_facts.drop_ruby[1] }}"
shell: bash -lc "rm -rf {{ rbenv_root }}/versions/{{ item.ansible_facts.drop_ruby[1] }}"
changed_when: false
become: yes
become_user: "{{ item.ansible_facts.drop_ruby[0] }}"
Expand All @@ -125,7 +125,7 @@
ignore_errors: yes

- name: check if user ruby version is {{ rbenv.default_ruby }}
shell: $SHELL -lc "{{ rbenv_root }}/bin/rbenv version | cut -d ' ' -f 1 | grep -Fx '{{ rbenv.default_ruby }}'"
shell: bash -lc "{{ rbenv_root }}/bin/rbenv version | cut -d ' ' -f 1 | grep -Fx '{{ rbenv.default_ruby }}'"
become: yes
become_user: "{{ item }}"
with_items: "{{ rbenv_users }}"
Expand All @@ -136,7 +136,7 @@
check_mode: no

- name: set ruby {{ rbenv.default_ruby }} for select users
shell: $SHELL -lc "{{ rbenv_root }}/bin/rbenv global {{ rbenv.default_ruby }} && rbenv rehash"
shell: bash -lc "{{ rbenv_root }}/bin/rbenv global {{ rbenv.default_ruby }} && rbenv rehash"
become: yes
become_user: "{{ item[1] }}"
with_together:
Expand Down