ソースを参照

Use bash -c to change directory and add env vars for unless/onlyif

cwd and env is not passed to unless/onlyif anymore in salt 3001
tags/v1.0.0
Benjamin Neff 4年前
コミット
e06124fff6
コミッターのメールアドレスに関連付けられたアカウントが存在しません
1個のファイルの変更3行の追加3行の削除
  1. +3
    -3
      diaspora/install.sls

+ 3
- 3
diaspora/install.sls ファイルの表示

@@ -150,7 +150,7 @@ diaspora_bundle_install:
- name: rvm ruby-{{ diaspora.ruby_version }}@diaspora do bin/bundle install --full-index
- runas: {{ diaspora.user.username }}
- cwd: {{ diaspora.install_path }}
- unless: rvm ruby-{{ diaspora.ruby_version }}@diaspora do bin/bundle check
- unless: bash -c 'cd {{ diaspora.install_path }}; RAILS_ENV={{ environment }} rvm ruby-{{ diaspora.ruby_version }}@diaspora do bin/bundle check'
- env:
- RAILS_ENV: {{ environment }}
- require:
@@ -161,7 +161,7 @@ diaspora_create_database:
- name: rvm ruby-{{ diaspora.ruby_version }}@diaspora do bin/rake db:create db:migrate
- runas: {{ diaspora.user.username }}
- cwd: {{ diaspora.install_path }}
- onlyif: rvm ruby-{{ diaspora.ruby_version }}@diaspora do bin/rails runner "ActiveRecord::Base.connection" |& grep "database \"{{ diaspora.database.database }}\" does not exist (ActiveRecord::NoDatabaseError)"
- onlyif: bash -c 'cd {{ diaspora.install_path }}; RAILS_ENV={{ environment }} rvm ruby-{{ diaspora.ruby_version }}@diaspora do bin/rails runner "ActiveRecord::Base.connection" |& grep "database \"{{ diaspora.database.database }}\" does not exist (ActiveRecord::NoDatabaseError)"'
- env:
- RAILS_ENV: {{ environment }}
- require:
@@ -176,7 +176,7 @@ diaspora_migrate_database:
- name: rvm ruby-{{ diaspora.ruby_version }}@diaspora do bin/rake db:migrate
- runas: {{ diaspora.user.username }}
- cwd: {{ diaspora.install_path }}
- onlyif: rvm ruby-{{ diaspora.ruby_version }}@diaspora do bin/rake db:migrate:status | grep -oE "^\s+down"
- onlyif: bash -c 'cd {{ diaspora.install_path }}; RAILS_ENV={{ environment }} rvm ruby-{{ diaspora.ruby_version }}@diaspora do bin/rake db:migrate:status | grep -oE "^\s+down"'
- env:
- RAILS_ENV: {{ environment }}
- require:

読み込み中…
キャンセル
保存