Ensure that comments are not counted
With the previous grep, it was possible that any commented nameserver
entries would be counted. This patch fixes that.
Change-Id: I9925cb9a71c1b58dcf12f70d8ce0872386732f06
Closes-Bug: #1768725
(cherry picked from commit 6cae2c1e46
)
This commit is contained in:
parent
b2eb75a326
commit
8c55927d31
|
@ -311,7 +311,7 @@
|
|||
# Linting checks need to be skipped because this command doesn't create any
|
||||
# files.
|
||||
- name: Count nameserver entries in /etc/resolv.conf
|
||||
command: grep nameserver /etc/resolv.conf
|
||||
command: grep ^nameserver /etc/resolv.conf
|
||||
register: nameserver_check
|
||||
check_mode: no
|
||||
changed_when: False
|
||||
|
|
Loading…
Reference in New Issue