55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
|
---
|
||
|
- hosts: all
|
||
|
become: false
|
||
|
gather_facts: false
|
||
|
tasks:
|
||
|
|
||
|
- name: Update drac DNS1
|
||
|
raw: set iDRAC.IPv4.DNS1 72.3.128.240
|
||
|
register: dns1Result
|
||
|
changed_when:
|
||
|
- '"modified successfully" in dns1Result.stdout'
|
||
|
|
||
|
- name: Update drac DNS2
|
||
|
raw: set iDRAC.IPv4.DNS2 72.3.128.241
|
||
|
register: dns2Result
|
||
|
changed_when:
|
||
|
- '"modified successfully" in dns2Result.stdout'
|
||
|
|
||
|
- name: Change snmptrap version
|
||
|
raw: set idrac.snmp.trapformat SNMPv1
|
||
|
register: snmpVersionResult
|
||
|
changed_when:
|
||
|
- '"modified successfully" in snmpVersionResult.stdout'
|
||
|
|
||
|
- name: Change trap destination
|
||
|
raw: config -g cfgIpmiPet -o cfgIpmiPetAlertDestIPAddr -i 1 hardwarealerts.dfw3.rackspace.com
|
||
|
register: trapDestResult
|
||
|
changed_when:
|
||
|
- '"modified successfully" in trapDestResult.stdout'
|
||
|
|
||
|
- name: Enable trap destination
|
||
|
raw: config -g cfgIpmiPet -o cfgIpmiPetAlertEnable -i 1 1
|
||
|
register: trapDestOnResult
|
||
|
changed_when:
|
||
|
- '"modified successfully" in trapDestOnResult.stdout'
|
||
|
|
||
|
- name: Check changes
|
||
|
raw: |
|
||
|
get iDRAC.IPv4.DNS2
|
||
|
register: checkOutput
|
||
|
|
||
|
- name: Show check output
|
||
|
debug:
|
||
|
var: checkOutput.stdout_lines
|
||
|
|
||
|
- name: Check changes
|
||
|
raw: |
|
||
|
get iDRAC.IPv4.DNS1
|
||
|
register: checkOutput1
|
||
|
|
||
|
- name: Show check output1
|
||
|
debug:
|
||
|
var: checkOutput1.stdout_lines
|
||
|
|