
Given the volume and ephemeral nature of the nodes we are running jobs on, we're interested in raising the minimum TTL to ensure we're not needlessly querying domains all the time. Some domains such as github.com or fedoraproject.org have low TTLs and we suspect there is a correlation between their low TTLs and the fact that we're seeing increased DNS lookup rates for these domains. Change-Id: I6d9656cb07a694fc2f54f256a63af814c034ffb8
49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
- name: Test the configure-unbound role
|
|
hosts: all
|
|
roles:
|
|
- role: configure-unbound
|
|
post_tasks:
|
|
- name: Check that unbound is started
|
|
become: yes
|
|
service:
|
|
name: unbound
|
|
state: started
|
|
register: unbound_service
|
|
|
|
- name: Ensure that unbound is started
|
|
assert:
|
|
that:
|
|
- not unbound_service | changed
|
|
|
|
# Until nodepool no longer embeds a forwarding.conf in the image, it is
|
|
# safe to assume that we'll be changing the forwarding configuration
|
|
# because the role has logic to use v6 *or* v4 nameservers while nodepool
|
|
# puts all four nameservers.
|
|
- name: Ensure that configuration was installed
|
|
assert:
|
|
that:
|
|
- forwarding_config | changed
|
|
- ttl_config | changed
|
|
|
|
- name: Check if /etc/unbound/forwarding.conf exists
|
|
stat:
|
|
path: /etc/unbound/forwarding.conf
|
|
register: forwarding_file
|
|
|
|
- name: Check if /etc/unbound/conf.d/ttl.conf exists
|
|
stat:
|
|
path: "{{ unbound_confd }}/ttl.conf"
|
|
register: ttl_file
|
|
|
|
- name: Ensure that configuration files exist
|
|
assert:
|
|
that:
|
|
- forwarding_file.stat.exists
|
|
- ttl_file.stat.exists
|
|
|
|
# This is self-tested, no need to assert
|
|
- name: Do a host lookup (sanity check)
|
|
command: host openstack.org
|
|
changed_when: false
|
|
|