Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.

Commit

Permalink
Fix skipping when host fail to update
Browse files Browse the repository at this point in the history
Change-Id: I32d73bf37a891983e8c70e46bffa76b65ac345e0
Signed-off-by: Ondra Machacek <[email protected]>
  • Loading branch information
machacekondra committed Mar 14, 2018
1 parent 30d0628 commit 0e86f32
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
11 changes: 1 addition & 10 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,7 @@

# Update only those hosts that aren't in list of hosts were VMs are pinned
# or if stop_non_migratable_vms is enabled, which means we stop pinned VMs
- name: Upgrade host
# TODO: change to ovirt_hosts, when Ansible 2.6 is out:
ovirt_hosts_26:
auth: "{{ ovirt_auth }}"
name: "{{ item.name }}"
state: upgraded
check_upgrade: "{{ check_upgrade }}"
reboot_after_upgrade: "{{ reboot_after_upgrade }}"
timeout: "{{ upgrade_timeout }}"
register: host_upgraded
- include: upgrade.yml
with_items:
- "{{ ovirt_hosts }}"
when: "item.id not in host_ids or stop_non_migratable_vms"
Expand Down
9 changes: 9 additions & 0 deletions tasks/upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- name: Upgrade host
# TODO: change to ovirt_hosts, when Ansible 2.6 is out:
ovirt_hosts_26:
auth: "{{ ovirt_auth }}"
name: "{{ item.name }}"
state: upgraded
check_upgrade: "{{ check_upgrade }}"
reboot_after_upgrade: "{{ reboot_after_upgrade }}"
timeout: "{{ upgrade_timeout }}"

0 comments on commit 0e86f32

Please sign in to comment.