diff --git a/ansible/roles/sonic-common/tasks/main.yml b/ansible/roles/sonic-common/tasks/main.yml index 1b5f1997163..3136ad5fac4 100644 --- a/ansible/roles/sonic-common/tasks/main.yml +++ b/ansible/roles/sonic-common/tasks/main.yml @@ -185,6 +185,10 @@ mode=0644 tags: ssw +# Setup Platform +- include: platform.yml + tags: platform,unsafe + # Install Persistent Iptables Package - name: Install iptables-persistent become: true diff --git a/ansible/roles/sonic-common/tasks/platform-dell.yml b/ansible/roles/sonic-common/tasks/platform-dell.yml new file mode 100644 index 00000000000..3c57ff4e5f9 --- /dev/null +++ b/ansible/roles/sonic-common/tasks/platform-dell.yml @@ -0,0 +1,8 @@ +# Ensure Platform Modules for S6000 are installed +- name: Confirm Platform Modules are installed + become: true + apt: pkg={{ platform_modules_s6000.name }}={{ platform_modules_s6000.version }} + state=present + default_release={{ apt_default_release }} + force=yes + register: platform_module_install diff --git a/ansible/roles/sonic-common/tasks/platform-mlnx.yml b/ansible/roles/sonic-common/tasks/platform-mlnx.yml new file mode 100644 index 00000000000..f2ee5d68a17 --- /dev/null +++ b/ansible/roles/sonic-common/tasks/platform-mlnx.yml @@ -0,0 +1,28 @@ +- name: Ensure pciutils is installed + apt: pkg=pciutils + state=present + force=yes + +- name: Ensure MLNX Firmware tools are installed + apt: pkg=mft + state=present + default_release={{ apt_default_release }} + force=yes + +- name: Ensure MLNX Firmware kernel modules are installed + apt: pkg=kernel-mft-modules + state=present + default_release={{ apt_default_release }} + force=yes + +- name: Ensure Firmware service started and Enabled + become: true + service: name=mst + state=started + enabled=yes + +- name: Ensure MLNX Platform modules are installed + apt: pkg=hw-management + state=present + default_release={{ apt_default_release }} + force=yes diff --git a/ansible/roles/sonic-common/tasks/platform.yml b/ansible/roles/sonic-common/tasks/platform.yml new file mode 100644 index 00000000000..6c101a60ea2 --- /dev/null +++ b/ansible/roles/sonic-common/tasks/platform.yml @@ -0,0 +1,11 @@ +# Install Platform Modules for Dell +- name: Confirm Platform Modules for Dell are installed + become: true + include: platform-dell.yml + when: sonic_hwsku == "Force10-S6000" or sonic_hwsku == "ACS-S6000" + +# Install Platform Modules for Mellanox +- name: Confirm Platform Modules for Mellanox are installed + become: true + include: platform-mlnx.yml + when: sonic_hwsku == "ACS-MSN2700"