-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
2,529 additions
and
231 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
# FUJITSU LIMITED | ||
# Copyright 2018 FUJITSU LIMITED | ||
# GNU General Public License v3.0+ (see [LICENSE.md](LICENSE.md) or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
|
||
# example playbook to get user data from iRMC and store | ||
# in a file in JSON format | ||
|
||
# variables not defined in this playbook are expected to be provided | ||
# elsewhere, e.g. in group_vars/all | ||
|
||
- name: Delete all arrays on controller and create new array | ||
connection: local | ||
hosts: iRMC_group | ||
|
||
vars: | ||
# iRMC login credentials | ||
# irmc_user: "admin" | ||
# irmc_password: "admin" | ||
# Note: set validate_certificate to false for self-signed certificate | ||
# validate_certificate: false | ||
# adapter: 0 | ||
# array_all: -1 | ||
# level: 1 | ||
# name: "TestRaid-1" | ||
|
||
gather_facts: false | ||
|
||
tasks: | ||
- name: Get current RAID configuration | ||
irmc_raid: | ||
irmc_url: "{{ inventory_hostname }}" | ||
irmc_username: "{{ irmc_user }}" | ||
irmc_password: "{{ irmc_password }}" | ||
validate_certs: "{{ validate_certificate }}" | ||
command: "get" | ||
register: raid | ||
delegate_to: localhost | ||
- name: Show current RAID configuration | ||
debug: | ||
msg: "{{ raid.configuration }}" | ||
|
||
- name: Delete all RAID arrays on adapter | ||
irmc_raid: | ||
irmc_url: "{{ inventory_hostname }}" | ||
irmc_username: "{{ irmc_user }}" | ||
irmc_password: "{{ irmc_password }}" | ||
validate_certs: "{{ validate_certificate }}" | ||
command: "delete" | ||
adapter: "{{ adapter }}" | ||
array: "{{ array_all }}" | ||
delegate_to: localhost | ||
|
||
- name: Create RAID array | ||
irmc_raid: | ||
irmc_url: "{{ inventory_hostname }}" | ||
irmc_username: "{{ irmc_user }}" | ||
irmc_password: "{{ irmc_password }}" | ||
validate_certs: "{{ validate_certificate }}" | ||
command: "create" | ||
adapter: "{{ adapter }}" | ||
level: "{{ level }}" | ||
name: "{{ name }}" | ||
delegate_to: localhost | ||
|
||
- name: Get new RAID configuration | ||
irmc_raid: | ||
irmc_url: "{{ inventory_hostname }}" | ||
irmc_username: "{{ irmc_user }}" | ||
irmc_password: "{{ irmc_password }}" | ||
validate_certs: "{{ validate_certificate }}" | ||
command: "get" | ||
register: new | ||
delegate_to: localhost | ||
- name: Show new RAID configuration | ||
debug: | ||
msg: "{{ new.configuration }}" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
# FUJITSU LIMITED | ||
# Copyright 2018 FUJITSU LIMITED | ||
# GNU General Public License v3.0+ (see [LICENSE.md](LICENSE.md) or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
|
||
# example playbook to offline update a PRIMERGY server via eLCM | ||
|
||
# variables not defined in this playbook are expected to be provided | ||
# elsewhere, e.g. in group_vars/all | ||
|
||
# Notes: | ||
# - iRMC needs to be supplied with an eLCM License | ||
# - iRMC needs to be supplied with an eLCM SD-Card | ||
|
||
- name: offline update a PRIMERGY server via eLCM | ||
connection: local | ||
hosts: iRMC_group | ||
|
||
vars: | ||
# iRMC login credentials | ||
# irmc_user: "admin" | ||
# irmc_password: "admin" | ||
# Note: set validate_certificate to false for self-signed certificate | ||
# validate_certificate: false | ||
# elcm_server: "https://support.ts.fujitsu.com" | ||
# elcm_catalog: "DownloadManager/globalflash/GF_par_tree.exe" | ||
# elcm_use_proxy: false | ||
# elcm_proxy_url: "http://proxy.local" | ||
# elcm_proxy_port: "8080" | ||
# elcm_proxy_user: "user" | ||
# elcm_proxy_password: "password" | ||
# elcm_component: "PrimSupportPack-Win" | ||
# elcm_subcomponent: "FSC_SCAN" | ||
# elcm_skip_hcl_verify: true | ||
|
||
gather_facts: false | ||
|
||
tasks: | ||
- name: Get system power state | ||
irmc_powerstate: | ||
irmc_url: "{{ inventory_hostname }}" | ||
irmc_username: "{{ irmc_user }}" | ||
irmc_password: "{{ irmc_password }}" | ||
validate_certs: "{{ validate_certificate }}" | ||
command: "get" | ||
register: powerstate | ||
delegate_to: localhost | ||
|
||
- name: Check that server is 'Off' | ||
fail: | ||
msg: "Cannot continue, server is 'On'" | ||
when: powerstate.power_state=="On" | ||
|
||
- name: Configure eLCM Update Repository | ||
irmc_elcm_repository: | ||
irmc_url: "{{ inventory_hostname }}" | ||
irmc_username: "{{ irmc_user }}" | ||
irmc_password: "{{ irmc_password }}" | ||
validate_certs: "{{ validate_certificate }}" | ||
command: "set" | ||
server: "{{ elcm_server }}" | ||
catalog: "{{ elcm_catalog }}" | ||
use_proxy: "{{ elcm_use_proxy }}" | ||
proxy_url: "{{ elcm_proxy_url }}" | ||
proxy_port: "{{ elcm_proxy_port }}" | ||
proxy_user: "{{ elcm_proxy_user }}" | ||
proxy_password: "{{ elcm_proxy_password }}" | ||
delegate_to: localhost | ||
|
||
- name: Prepare eLCM Offline Update | ||
irmc_elcm_offline_update: | ||
irmc_url: "{{ inventory_hostname }}" | ||
irmc_username: "{{ irmc_user }}" | ||
irmc_password: "{{ irmc_password }}" | ||
validate_certs: "{{ validate_certificate }}" | ||
command: "prepare" | ||
skip_hcl_verify: "{{ elcm_skip_hcl_verify }}" | ||
wait_for_finish: true | ||
delegate_to: localhost | ||
|
||
- name: Execute eLCM Offline Update | ||
irmc_elcm_offline_update: | ||
irmc_url: "{{ inventory_hostname }}" | ||
irmc_username: "{{ irmc_user }}" | ||
irmc_password: "{{ irmc_password }}" | ||
validate_certs: "{{ validate_certificate }}" | ||
command: "execute" | ||
ignore_power_on: false | ||
wait_for_finish: true | ||
delegate_to: localhost |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
# FUJITSU LIMITED | ||
# Copyright 2018 FUJITSU LIMITED | ||
# GNU General Public License v3.0+ (see [LICENSE.md](LICENSE.md) or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
|
||
# example playbook to online update a PRIMERGY server via eLCM | ||
|
||
# variables not defined in this playbook are expected to be provided | ||
# elsewhere, e.g. in group_vars/all | ||
|
||
# Notes: | ||
# - iRMC needs to be supplied with an eLCM License | ||
# - iRMC needs to be supplied with an eLCM SD-Card | ||
|
||
- name: online update a PRIMERGY server via eLCM | ||
connection: local | ||
hosts: iRMC_group | ||
|
||
vars: | ||
# iRMC login credentials | ||
# irmc_user: "admin" | ||
# irmc_password: "admin" | ||
# Note: set validate_certificate to false for self-signed certificate | ||
# validate_certificate: false | ||
# elcm_server: "https://support.ts.fujitsu.com" | ||
# elcm_catalog: "DownloadManager/globalflash/GF_par_tree.exe" | ||
# elcm_use_proxy: false | ||
# elcm_proxy_url: "http://proxy.local" | ||
# elcm_proxy_port: "8080" | ||
# elcm_proxy_user: "user" | ||
# elcm_proxy_password: "password" | ||
# elcm_component: "PrimSupportPack-Win" | ||
# elcm_subcomponent: "FSC_SCAN" | ||
# elcm_skip_hcl_verify: true | ||
|
||
gather_facts: false | ||
|
||
tasks: | ||
- name: Get system power state | ||
irmc_powerstate: | ||
irmc_url: "{{ inventory_hostname }}" | ||
irmc_username: "{{ irmc_user }}" | ||
irmc_password: "{{ irmc_password }}" | ||
validate_certs: "{{ validate_certificate }}" | ||
command: "get" | ||
register: powerstate | ||
delegate_to: localhost | ||
|
||
- name: Check that server is 'On' | ||
fail: | ||
msg: "Cannot continue, server is 'Off'" | ||
when: powerstate.power_state=="Off" | ||
|
||
- name: Configure eLCM Update Repository | ||
irmc_elcm_repository: | ||
irmc_url: "{{ inventory_hostname }}" | ||
irmc_username: "{{ irmc_user }}" | ||
irmc_password: "{{ irmc_password }}" | ||
validate_certs: "{{ validate_certificate }}" | ||
command: "set" | ||
server: "{{ elcm_server }}" | ||
catalog: "{{ elcm_catalog }}" | ||
use_proxy: "{{ elcm_use_proxy }}" | ||
proxy_url: "{{ elcm_proxy_url }}" | ||
proxy_port: "{{ elcm_proxy_port }}" | ||
proxy_user: "{{ elcm_proxy_user }}" | ||
proxy_password: "{{ elcm_proxy_password }}" | ||
delegate_to: localhost | ||
|
||
- name: Generate eLCM Online Update List | ||
irmc_elcm_online_update: | ||
irmc_url: "{{ inventory_hostname }}" | ||
irmc_username: "{{ irmc_user }}" | ||
irmc_password: "{{ irmc_password }}" | ||
validate_certs: "{{ validate_certificate }}" | ||
command: "check" | ||
skip_hcl_verify: "{{ elcm_skip_hcl_verify }}" | ||
wait_for_finish: true | ||
delegate_to: localhost | ||
|
||
- name: Execute eLCM Online Update | ||
irmc_elcm_online_update: | ||
irmc_url: "{{ inventory_hostname }}" | ||
irmc_username: "{{ irmc_user }}" | ||
irmc_password: "{{ irmc_password }}" | ||
validate_certs: "{{ validate_certificate }}" | ||
command: "execute" | ||
wait_for_finish: true | ||
delegate_to: localhost | ||
|
||
- name: Delete eLCM Online Update List | ||
irmc_elcm_online_update: | ||
irmc_url: "{{ inventory_hostname }}" | ||
irmc_username: "{{ irmc_user }}" | ||
irmc_password: "{{ irmc_password }}" | ||
validate_certs: "{{ validate_certificate }}" | ||
command: "delete" | ||
delegate_to: localhost |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
# FUJITSU LIMITED | ||
# Copyright 2018 FUJITSU LIMITED | ||
# GNU General Public License v3.0+ (see [LICENSE.md](LICENSE.md) or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
|
||
# example playbook for module 'irmc_elcm_offline_update' | ||
# to offline update a server via iRMC | ||
|
||
# variables not defined in this playbook are expected to be provided | ||
# elsewhere, e.g. in group_vars/all | ||
|
||
- name: irmc_elcm_offline_update - usage examples | ||
connection: local | ||
hosts: iRMC_group | ||
|
||
vars: | ||
# iRMC login credentials | ||
# irmc_user: "admin" | ||
# irmc_password: "admin" | ||
# Note: set validate_certificate to false for self-signed certificate | ||
# validate_certificate: false | ||
|
||
gather_facts: false | ||
|
||
tasks: | ||
# Prepare eLCM Offline Update | ||
- name: Prepare eLCM Offline Update | ||
irmc_elcm_offline_update: | ||
irmc_url: "{{ inventory_hostname }}" | ||
irmc_username: "{{ irmc_user }}" | ||
irmc_password: "{{ irmc_password }}" | ||
validate_certs: "{{ validate_certificate }}" | ||
command: "prepare" | ||
skip_hcl_verify: "{{ elcm_skip_hcl_verify }}" | ||
ignore_power_on: false | ||
delegate_to: localhost | ||
|
||
# Execute eLCM Offline Update | ||
- name: Execute eLCM Offline Update | ||
irmc_elcm_offline_update: | ||
irmc_url: "{{ inventory_hostname }}" | ||
irmc_username: "{{ irmc_user }}" | ||
irmc_password: "{{ irmc_password }}" | ||
validate_certs: "{{ validate_certificate }}" | ||
command: "execute" | ||
ignore_power_on: false | ||
wait_for_finish: true |
Oops, something went wrong.