ansible-role-zammad/tasks/ruby.yml

43 lines
1.2 KiB
YAML

- 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:
path: "{{ ruby_path }}/versions/{{ ruby_version.stdout }}"
register: ruby_installed
- name: "ruby installieren"
command:
cmd: "rbenv install {{ ruby_version.stdout }}"
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"
shell: "RAILS_ENV=production rbenv exec bundle install --without test development mysql"
args:
chdir: "{{ zammad_home }}"
become: true
become_user: "{{ zammad_user }}"