ansible-role-zammad/tasks/ruby.yml

55 lines
1.4 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
check_mode: 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 }}"
2022-10-29 21:49:56 +02:00
- name: "ruby | Kopiere Gemfile.local"
copy:
src: Gemfile.local
dest: "{{ zammad_home }}/Gemfile.local"
owner: "{{ zammad_user }}"
group: "{{ zammad_user }}"
2021-07-28 18:28:22 +02:00
- 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