Skip to content

Commit

Permalink
fix(ansible): intel mev add acc provisioning
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 authored May 26, 2024
1 parent 07dcd2f commit 0a3118a
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions lab/ansible/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,39 @@

# TODO: now update ACC using /usr/bin/imc-scripts/acc_os_partition_provision.sh

- name: Upgrade Intel Mev ACC FW to {{ acc_version }}
when: not acc_version in hostvars.mev.acc_run_version
block:
- name: Check if firmware image exists remotely {{ acc_remote_file }}
ansible.builtin.stat: path={{ acc_remote_file }}
register: acc_remote_file_check

# FW file doesn't exist, copy and unpack it

- name: Copy and Extract {{ acc_local_file }} into remote /work folder
when: not acc_remote_file_check.stat.exists
block:
- name: Check if firmware image exists locally {{ acc_local_file }}
delegate_to: localhost
ansible.builtin.stat: path={{ acc_local_file }}
register: acc_local_file_check

- name: Copy and Unpack {{ acc_local_file }} into remote /work folder
when: acc_local_file_check.stat.exists
ansible.builtin.unarchive: src={{ acc_local_file }} dest=/work

- name: Check again if firmware image exists remotely {{ acc_remote_file }} after copy and unpack
ansible.builtin.stat: path={{ acc_remote_file }}
register: acc_remote_file_check

# FW file exists, use it to start upgrade

- name: Start upgrade Intel Mev ACC FW using existing {{ acc_remote_file }}
when: acc_remote_file_check.stat.exists
block:
# TODO: remove echo below
- ansible.builtin.shell: ls /usr/bin/imc-scripts/acc_os_partition_provision.sh {{ acc_remote_file }}

- name:
hosts: bf2
become: yes
Expand Down

0 comments on commit 0a3118a

Please sign in to comment.