Skip to content

Commit

Permalink
Updated rake commands to capture STDERR.
Browse files Browse the repository at this point in the history
  • Loading branch information
curt-matthews authored and itewk committed Oct 22, 2018
1 parent a948f7d commit 58c198c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
14 changes: 12 additions & 2 deletions playbooks/migrate-5-7-to-5-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,30 @@
name: rh-postgresql95-postgresql
state: started

- name: CFME | Migrate | 5.8 to 5.9 | Wait for postgresql
hosts: cfme-databases
become: True
gather_facts: False
tasks:
- name: CFME | Migrate | Wait for postgresql
wait_for:
port: 5432
delay: 120

- name: CFME | Migrate | 5.7 to 5.8 | DB Migration
hosts: cfme-appliances
become: True
gather_facts: False
tasks:
- name: CFME | Migrate | rake db:migrate
run_once: True
shell: "cd /var/www/miq/vmdb; rake db:migrate | tee /var/tmp/rake_db_migrate.out"
shell: "cd /var/www/miq/vmdb; rake db:migrate > >(tee /var/tmp/rake_db_migrate.out) 2> >(tee /var/tmp/rake_db_migrate.err >&2)"
async: 18000
poll: 60

- name: CFME | Migrate | rake evm:automate:reset
run_once: True
shell: "cd /var/www/miq/vmdb; rake evm:automate:reset | tee /var/tmp/evm_automate_reset.out"
shell: "cd /var/www/miq/vmdb; rake evm:automate:reset > >(tee /var/tmp/evm_automate_reset.out) 2> >(tee /var/tmp/evm_automate_reset.err >&2)"
async: 3600
poll: 60

Expand Down
16 changes: 12 additions & 4 deletions playbooks/migrate-5-8-to-5-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,30 @@
name: rh-postgresql95-postgresql
state: started

- name: CFME | Migrate | 5.8 to 5.9 | Wait for postgresql
hosts: cfme-databases
become: True
gather_facts: False
tasks:
- name: CFME | Migrate | Wait for postgresql
wait_for:
port: 5432
delay: 120

- name: CFME | Migrate | 5.8 to 5.9 | DB Migration
hosts: cfme-appliances
become: True
gather_facts: False
tasks:
- name: CFME | Migrate | rake db:migrate
run_once: True
shell: "cd /var/www/miq/vmdb; rake db:migrate | tee /var/tmp/rake_db_migrate.out"
shell: "cd /var/www/miq/vmdb; rake db:migrate > >(tee /var/tmp/rake_db_migrate.out) 2> >(tee /var/tmp/rake_db_migrate.err >&2)"
async: 18000
poll: 60

- name: CFME | Migrate | rake evm:automate:reset
run_once: True
shell: "cd /var/www/miq/vmdb; rake evm:automate:reset | tee /var/tmp/evm_automate_reset.out"
async: 3600
poll: 60
shell: "cd /var/www/miq/vmdb; rake evm:automate:reset > >(tee /var/tmp/evm_automate_reset.out) 2> >(tee /var/tmp/evm_automate_reset.err >&2)"

- name: CFME | Migrate | 5.8 to 5.9 | Post DB Migrate Restart
hosts: cfme-databases
Expand Down

0 comments on commit 58c198c

Please sign in to comment.