Skip to content

Commit

Permalink
fix(ansible): small refactor for next change
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb authored May 28, 2024
1 parent 940dcf1 commit b01c50c
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions lab/ansible/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,15 @@
hosts: mev
become: yes
tasks:
- ansible.builtin.shell: cat /etc/issue
- ansible.builtin.shell: cat /etc/issue.net
register: result
- ansible.builtin.set_fact: acc_run_version={{ result.stdout | trim }}
- ansible.builtin.debug: var=acc_run_version
- ansible.builtin.fail: msg="Could not find ACC string in the running {{ acc_run_version }}"
when: not '"ACC" in acc_run_version'
- name: Fetch Intel Mev ACC running version
block:
- ansible.builtin.shell: cat /etc/issue
- ansible.builtin.shell: cat /etc/issue.net
register: result
- ansible.builtin.set_fact: acc_run_version={{ result.stdout | trim }}
- ansible.builtin.debug: var=acc_run_version
- ansible.builtin.fail: msg="Could not find ACC string in the running {{ acc_run_version }}"
when: not '"ACC" in acc_run_version'

- name:
hosts: mevbmc
Expand All @@ -200,15 +202,17 @@
acc_remote_file: /work/intel-ipu-acc-eval-image-{{ acc_version }}/ACC/OS/acc-os-kernel.bin
ansible_remote_tmp: /tmp
tasks:
- ansible.builtin.shell: cat /etc/issue
- ansible.builtin.shell: cat /etc/issue.net
register: result
- ansible.builtin.set_fact: imc_run_version={{ result.stdout | trim }}
- ansible.builtin.debug: var=imc_run_version
- ansible.builtin.shell: /usr/bin/ipu-update -i
- ansible.builtin.debug: var=hostvars.mev.acc_run_version
- ansible.builtin.fail: msg="Could not find IMC string in the running {{ imc_run_version }}"
when: not '"IMC" in imc_run_version'
- name: Fetch Intel Mev IMC running version
block:
- ansible.builtin.shell: cat /etc/issue
- ansible.builtin.shell: cat /etc/issue.net
register: result
- ansible.builtin.set_fact: imc_run_version={{ result.stdout | trim }}
- ansible.builtin.debug: var=imc_run_version
- ansible.builtin.shell: /usr/bin/ipu-update -i
- ansible.builtin.debug: var=hostvars.mev.acc_run_version
- ansible.builtin.fail: msg="Could not find IMC string in the running {{ imc_run_version }}"
when: not '"IMC" in imc_run_version'

- name: Upgrade Intel Mev IMC FW to {{ imc_version }}
when: not imc_version in imc_run_version
Expand Down

0 comments on commit b01c50c

Please sign in to comment.