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
This commit is contained in:
Mohammed Naser 2018-05-08 12:18:12 -04:00
parent 8778639137
commit 6cae2c1e46
1 changed files with 1 additions and 1 deletions

View File

@ -321,7 +321,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