37 lines
728 B
YAML
37 lines
728 B
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: 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
|
|
|