diff --git a/playbooks/base/post.yaml b/playbooks/base/post.yaml deleted file mode 100644 index 2884383af..000000000 --- a/playbooks/base/post.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- hosts: all:!appliance* - tasks: - - name: Collect log output - no_log: true - synchronize: - dest: "{{ zuul.executor.log_root }}/" - mode: pull - src: "{{ ansible_user_dir }}/zuul-output/logs/" - verify_host: true diff --git a/playbooks/base/pre.yaml b/playbooks/base/pre.yaml deleted file mode 100644 index ae196b51a..000000000 --- a/playbooks/base/pre.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -- hosts: all:!appliance* - tasks: - # NOTE(pabelanger): We run this role in its own play to ensure unbound is - # restarted before proceeding with any other role. This is because we use - # notify / handler to restart the unbound service. With ansible notify - # actions are triggered at the end of each block of tasks in a play. - - name: Run configure-unbound role - include_role: - name: configure-unbound - -- hosts: all:!appliance* - tasks: - - name: Run validate-host role - include_role: - name: validate-host - -- hosts: all:!appliance* - tasks: - - name: Run configure-mirrors-fork role - include_role: - name: configure-mirrors-fork - - - name: Ensure zuul-output folder exists - file: - path: "{{ ansible_user_dir }}/zuul-output/logs/" - state: directory diff --git a/roles/configure-unbound/README.rst b/roles/configure-unbound/README.rst deleted file mode 100644 index 9e80061fd..000000000 --- a/roles/configure-unbound/README.rst +++ /dev/null @@ -1,48 +0,0 @@ -An ansible role to dynamically configure DNS forwarders for the -``unbound`` caching service. IPv6 will be preferred when there is a -usable IPv6 default route, otherwise IPv4. - -.. note:: This is not a standalone unbound configuration role. Base - setup is done during image builds in - ``project-config:nodepool/elements/nodepool-base/finalise.d/89-unbound``; - here we just do dynamic configuration of forwarders based on - the interfaces available on the actual host. - -**Role Variables** - -.. zuul:rolevar:: unbound_primary_nameserver_v4 - :default: 208.67.222.222 (OpenDNS) - - The primary IPv4 nameserver for fowarding requests - -.. zuul:rolevar:: unbound_secondary_nameserver_v4 - :default: 8.8.8.8 (Google) - - The secondary IPv4 nameserver for fowarding requests - -.. zuul:rolevar:: unbound_primary_nameserver_v6 - :default: 2620:0:ccc::2 (OpenDNS) - - The primary IPv6 nameserver for fowarding requests - -.. zuul:rolevar:: unbound_secondary_nameserver_v6 - :default: 2001:4860:4860::8888 (Google) - - The seconary IPv6 nameserver for fowarding requests - -.. zuul:rolevar:: unbound_cache_max_ttl - :default: 86400 - - Maximum TTL in seconds to keep successful queries cached for. - - This TTL will have precedence if the DNS record TTL is higher. - For example, a TTL of 90000 would be reduced to 86400. - -.. zuul:rolevar:: unbound_cache_min_ttl - :default: 0 - - Minimum TTL in seconds to keep queries cached for. - Note that this is effective for both successful and failed queries. - - This TTL will have precedence if the DNS record TTL is lower. - For example, a TTL of 60 would be raised to 900. diff --git a/roles/configure-unbound/defaults/main.yaml b/roles/configure-unbound/defaults/main.yaml deleted file mode 100644 index 402d4f7ee..000000000 --- a/roles/configure-unbound/defaults/main.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -# OpenDNS -unbound_primary_nameserver_v6: "2606:4700:4700::1111" -unbound_primary_nameserver_v4: "1.1.1.1" - -# Google -unbound_secondary_nameserver_v6: "2001:4860:4860::8888" -unbound_secondary_nameserver_v4: "8.8.8.8" - -# Time to live maximum for RRsets and messages in the cache. -# Default is 86400 seconds (1 day). If the maximum kicks in, -# responses to clients still get decrementing TTLs based on the -# original (larger) values. When the internal TTL expires, the -# cache item has expired. Can be set lower to force the resolver -# to query for data often, and not trust (very large) TTL values. -unbound_cache_max_ttl: 86400 - -# Time to live minimum for RRsets and messages in the cache. -# Default is 0. If the minimum kicks in, the data is cached for -# longer than the domain owner intended, and thus less queries are -# made to look up the data. Zero makes sure the data in the cache -# is as the domain owner intended, higher values, especially more -# than an hour or so, can lead to trouble as the data in the cache -# does not match up with the actual data any more. -unbound_cache_min_ttl: 0 diff --git a/roles/configure-unbound/handlers/main.yaml b/roles/configure-unbound/handlers/main.yaml deleted file mode 100644 index 540983760..000000000 --- a/roles/configure-unbound/handlers/main.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- name: Restart unbound - become: true - service: - name: unbound - state: restarted diff --git a/roles/configure-unbound/tasks/main.yaml b/roles/configure-unbound/tasks/main.yaml deleted file mode 100644 index 91b4e3db4..000000000 --- a/roles/configure-unbound/tasks/main.yaml +++ /dev/null @@ -1,53 +0,0 @@ ---- -- name: Set IPv4 nameservers - set_fact: - unbound_primary_nameserver: '{{ unbound_primary_nameserver_v4 }}' - unbound_secondary_nameserver: '{{ unbound_secondary_nameserver_v4 }}' - -- name: Include OS-specific variables - include_vars: "{{ item }}" - with_first_found: - - "{{ ansible_distribution }}.yaml" - - "{{ ansible_os_family }}.yaml" - - "default.yaml" - -- name: Ensure Unbound conf.d directory exists - become: true - file: - path: "{{ unbound_confd }}" - state: directory - -- name: Configure unbound forwarding - become: true - template: - dest: "{{ unbound_confd }}/forwarding.conf" - owner: root - group: root - mode: 0644 - src: forwarding.conf.j2 - notify: - - Restart unbound - -- name: Configure unbound TTL - become: true - template: - dest: "{{ unbound_confd }}/ttl.conf" - owner: root - group: root - mode: 0644 - src: ttl.conf.j2 - notify: - - Restart unbound - -- name: Update resolv.conf to localhost - become: true - copy: - content: nameserver 127.0.0.1 - dest: /etc/resolv.conf - -- name: Start unbound - become: true - service: - name: unbound - state: started - enabled: true diff --git a/roles/configure-unbound/templates/forwarding.conf.j2 b/roles/configure-unbound/templates/forwarding.conf.j2 deleted file mode 100644 index 3b52571eb..000000000 --- a/roles/configure-unbound/templates/forwarding.conf.j2 +++ /dev/null @@ -1,6 +0,0 @@ -# {{ ansible_managed }} - -forward-zone: - name: "." - forward-addr: {{ unbound_primary_nameserver }} - forward-addr: {{ unbound_secondary_nameserver }} diff --git a/roles/configure-unbound/templates/resolv.conf.j2 b/roles/configure-unbound/templates/resolv.conf.j2 deleted file mode 100644 index ea85974f5..000000000 --- a/roles/configure-unbound/templates/resolv.conf.j2 +++ /dev/null @@ -1,4 +0,0 @@ -# {{ ansible_managed }} - -nameserver {{ unbound_primary_nameserver }} -nameserver {{ unbound_secondary_nameserver }} diff --git a/roles/configure-unbound/templates/ttl.conf.j2 b/roles/configure-unbound/templates/ttl.conf.j2 deleted file mode 100644 index 34b5881a0..000000000 --- a/roles/configure-unbound/templates/ttl.conf.j2 +++ /dev/null @@ -1,5 +0,0 @@ -# {{ ansible_managed }} - -server: - cache-min-ttl: {{ unbound_cache_min_ttl }} - cache-max-ttl: {{ unbound_cache_max_ttl }} diff --git a/roles/configure-unbound/vars/Debian.yaml b/roles/configure-unbound/vars/Debian.yaml deleted file mode 100644 index 0da912604..000000000 --- a/roles/configure-unbound/vars/Debian.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -unbound_confd: /etc/unbound/unbound.conf.d diff --git a/roles/configure-unbound/vars/default.yaml b/roles/configure-unbound/vars/default.yaml deleted file mode 100644 index 24b8c1936..000000000 --- a/roles/configure-unbound/vars/default.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -unbound_confd: /etc/unbound/conf.d diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 502eedf31..82416197f 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -1,14 +1,4 @@ --- -- job: - name: base - parent: base-minimal - abstract: true - ansible-version: 2.9 - description: | - The base job for the Ansible installation of Zuul. - pre-run: playbooks/base/pre.yaml - post-run: playbooks/base/post.yaml - - job: name: github-workflows description: |