ansible-role-zammad/tasks/ruby.yml

44 lines
1.2 KiB
YAML
Raw Normal View History

2021-07-28 18:28:22 +02:00
- name: "ruby: rbenv einrichten"
lineinfile:
path: "{{ zammad_user_home }}/.bashrc"
line: eval "$(rbenv init -)"
- name: "ruby: rbenv plugin-verzeichnis erstellen"
file:
path: "{{ ruby_path }}/plugins"
state: directory
owner: "{{ zammad_user }}"
group: "{{ zammad_user }}"
- name: "ruby: ruby-build installieren"
git:
repo: "{{ ruby_build_repo }}"
dest: "{{ ruby_path }}/plugins/ruby-build"
- name: "ruby: Version prüfen"
stat:
2021-07-29 16:06:21 +02:00
path: "{{ ruby_path }}/versions/{{ ruby_version.stdout }}"
2021-07-28 18:28:22 +02:00
register: ruby_installed
- name: "ruby installieren"
command:
2021-07-29 16:06:21 +02:00
cmd: "rbenv install {{ ruby_version.stdout }}"
2021-07-28 18:28:22 +02:00
chdir: "{{ zammad_user_home }}"
become: true
become_user: "{{ zammad_user }}"
when: ruby_installed.stat.exists == False
- name: "ruby: Bundler installieren"
command:
cmd: rbenv exec gem install bundler
chdir: "{{ zammad_home }}"
become: true
become_user: "{{ zammad_user }}"
- name: "ruby: Ruby-Abhängigkeiten installieren"
2021-07-29 16:06:21 +02:00
shell: "RAILS_ENV=production rbenv exec bundle install --without test development mysql"
2021-07-28 18:28:22 +02:00
args:
chdir: "{{ zammad_home }}"
become: true
become_user: "{{ zammad_user }}"