UPD: run one change for each task
This commit is contained in:
parent
bbdf1f1e37
commit
112fe1e195
36
idrac/idrac-dns.yml
Normal file
36
idrac/idrac-dns.yml
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
- 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
|
||||
|
Loading…
Reference in New Issue
Block a user