UPD: run one change for each task

This commit is contained in:
xpk 2021-01-21 11:51:10 +08:00
parent bbdf1f1e37
commit 112fe1e195
Signed by: xpk
GPG Key ID: CD4FF6793F09AB86

36
idrac/idrac-dns.yml Normal file
View 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