Files
ansible-role-rvm/tasks/site.yml
Andreas Stephanides d34a747668 fetsite installation
2017-12-08 08:56:02 +01:00

46 lines
985 B
YAML

# Deploy a ruby site
# item:
# name: Seite
# git:
# repo: https://git_repository
# dest: destination on server
---
- debug:
msg: "deploy ruby site: {{site.name}}"
- command: echo "$PATH"
register: out
changed_when: false
- debug: msg="{{ out.stdout }}"
- name: "cloning git repository from {{site.git.repo}}"
git:
repo: "{{site.git.repo}}"
dest: "{{site.dest}}"
- name: ruby init
command: 'echo "$PATH"'
changed_when: false
args:
chdir: "{{site.dest}}"
environment:
PATH: "{{ rvm1_install_path }}/wrappers/default:{{ ansible_env.PATH }}"
register: out
- name: run_initscript
command: '../{{site.script}}'
args:
chdir: "{{site.dest}}"
register: out
environment:
PATH: "{{ rvm1_install_path }}/bin:{{ rvm1_install_path }}/wrappers/ruby-{{site.ruby}}@{{site.gemset}}:{{ ansible_env.PATH }}"
- debug: msg="{{ out.stdout_lines }}"
- include_tasks: fetsite.yml
when: not(site.ruby_init is undefined) and site.ruby_init