Skip to content

Commit

Permalink
fix(ansible): check version before staring an update
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <36732377+glimchb@users.noreply.github.com>
  • Loading branch information
glimchb committed May 25, 2024
1 parent 4dbaa21 commit 3ab629a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lab/ansible/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,16 @@
- ansible.builtin.unarchive: src={{ imc_local_file }} dest=/work

- ansible.builtin.shell: cat /etc/issue
register: result

- ansible.builtin.shell: /usr/bin/ipu-update -i
- ansible.builtin.shell: /usr/bin/ipu-update -i {{ imc_remote_file }}
when: imc_remote_file_check.stat.exists

#- ansible.builtin.shell: /usr/bin/ipu-update -u {{ imc_remote_file }}
# now reboot
- ansible.builtin.shell: echo /usr/bin/ipu-update -u {{ imc_remote_file }}
when: not imc_version in result.stdout

# TODO: now reboot

- name:
hosts: bf2
Expand Down

0 comments on commit 3ab629a

Please sign in to comment.