Procházet zdrojové kódy

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 před 4 roky
rodič
revize
e06124fff6
Žádný účet není propojen s e-mailovou adresou tvůrce revize
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. +3
    -3
      diaspora/install.sls

+ 3
- 3
diaspora/install.sls Zobrazit soubor

@@ -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:

Načítá se…
Zrušit
Uložit