Created
April 24, 2017 21:09
-
-
Save kd7lxl/406587560e5242b57ce3165b46baf983 to your computer and use it in GitHub Desktop.
Ansible playbook to install HP server management tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Install HP management tools | |
hosts: hp | |
become: yes | |
tasks: | |
- name: Install pexpect for Ansible expect | |
apt: | |
name: python-pexpect | |
- name: Add HP key | |
apt_key: | |
url: https://downloads.linux.hpe.com/SDR/hpePublicKey2048_key1.pub | |
state: present | |
- name: Get HP repo script | |
get_url: | |
url: https://downloads.linux.hpe.com/SDR/add_repo.sh | |
dest: /tmp/add_repo.sh | |
- name: Add HP repo | |
expect: | |
command: sh /tmp/add_repo.sh mcp | |
responses: | |
"Press enter to display it": "" | |
"--More--": "" | |
"Do you accept?": "yes" | |
"okay to overwrite": "yes" | |
- name: Ensure HP management tools are installed | |
apt: | |
name: hpssacli | |
state: present | |
update_cache: yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment