ansible-role-zammad/tasks/ruby.yml

47 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
2021-11-27 20:29:32 +01:00
changed_when: false
2021-07-28 18:28:22 +02:00
- 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-11-27 19:49:28 +01:00
shell: "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 }}"
2021-11-27 19:49:28 +01:00
environment:
RAILS_ENV: production