browbeat/ansible/install/roles/common/tasks/main.yml
Leif Madsen e9ee8a3705
Resolve linting issues for install/connmon.yml
Resolves linting issues:
* [ANSIBLE0012] Commands should not change things if nothing needs doing
* [ANSIBLE0010] Package installs should not use latest
* [ANSIBLE0013] Use shell only when shell functionality is required

Executed via: ansible-lint ansible/install/connmon.yml

Change-Id: Ibe52c904c1ebc083e4aa0db10034c1a628b215b8
2016-08-30 15:15:11 -04:00

18 lines
472 B
YAML

---
#
# Browbeat Install Common
#
- name: Check external connectivity
command: ping google.com -c 1 -q
register: ping
ignore_errors: true
tags:
# Skip ANSIBLE0012 Commands should not change things if nothing needs doing
# Need to check external activity every time
- skip_ansible_lint
- name: Add DNS record
become: true
lineinfile: dest=/etc/resolv.conf state=present line="nameserver {{ dns_server }}" insertafter="^search"
when: ping.rc != 0