Skip to content

Instantly share code, notes, and snippets.

@riblo
Last active December 9, 2019 15:16
Show Gist options
  • Save riblo/dceb3bcb8b4129be17e5f7fb95ca3b6a to your computer and use it in GitHub Desktop.
Save riblo/dceb3bcb8b4129be17e5f7fb95ca3b6a to your computer and use it in GitHub Desktop.
Ansible task to configure the Power State on the PowerEdge Servers
---
- hosts: hosts
connection: local
name: Configure Server Power Setting
gather_facts: False
tasks:
- name: Configure Server Power Setting
dellemc_change_power_state:
idrac_ip: "{{ idrac_ip }}"
idrac_user: "{{ idrac_user }}"
idrac_password: "{{ idrac_password }}"
change_power: "PushPowerButton"
tags:
- power_state
# change_power has other choices: ForceOff, GracefulRestart, GracefulShutdown, etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment