Skip to content

Instantly share code, notes, and snippets.

@Avatat
Created January 21, 2018 11:06
Show Gist options
  • Save Avatat/098d3cad9568d871e31793faff40a362 to your computer and use it in GitHub Desktop.
Save Avatat/098d3cad9568d871e31793faff40a362 to your computer and use it in GitHub Desktop.
Enable HBA Mode on HPE controller - Ansible role
- name: Add HPE APT repository keys
apt_key:
url: "{{ item }}"
state: present
with_items:
- "http://downloads.linux.hpe.com/SDR/hpPublicKey1024.pub"
- "http://downloads.linux.hpe.com/SDR/hpPublicKey2048.pub"
- "http://downloads.linux.hpe.com/SDR/hpPublicKey2048_key1.pub"
- "http://downloads.linux.hpe.com/SDR/hpePublicKey2048_key1.pub"
- name: Add HPE APT repository
apt_repository:
repo: deb http://downloads.linux.hpe.com/SDR/repo/mcp xenial/current non-free
state: present
- name: Install HPE Smart Storage Administration package
apt:
name: ssacli
state: present
update_cache: yes
- name: Remove all logical volumes and enable HBA mode
shell: "ssacli controller slot=2 logicaldrive all delete forced; ssacli controller slot=2 modify hbamode=on forced"
ignore_errors: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment