Browse Source

Removed dns role

This commit removes now-unused dns role.
Michael Gugino 7 years ago
parent
commit
0ae8e98040

+ 0 - 45
roles/dns/README.md

@@ -1,45 +0,0 @@
-dns
-===
-
-Configure a DNS server serving IPs of all the nodes of the cluster
-
-Requirements
-------------
-
-Ansible 2.2
-
-Role Variables
---------------
-
-| Name | Mandatory / Optional | Description |
-|------|----------------------|-------------|
-| `dns_zones` | Mandatory | DNS zones in which we must find the hosts |
-| `dns_forwarders` | If not set, the DNS will be a recursive non-forwarding DNS server | DNS forwarders to delegate the requests for hosts outside of `dns_zones` |
-| `dns_all_hosts` | Mandatory | Exhaustive list of hosts |
-| `base_docker_image` | Optional | Base docker image to build Bind image from, used only in containerized deployments |
-
-Dependencies
-------------
-
-None
-
-Example Playbook
-----------------
-
-    - hosts: dns_hosts
-      roles:
-      - role: dns
-        dns_forwarders: [ '8.8.8.8', '8.8.4.4' ]
-        dns_zones: [ novalocal, openstacklocal ]
-        dns_all_hosts: "{{ g_all_hosts }}"
-        base_docker_image: 'centos:centos7'
-
-License
--------
-
-ASL 2.0
-
-Author Information
-------------------
-
-OpenShift operations, Red Hat, Inc

+ 0 - 2
roles/dns/defaults/main.yml

@@ -1,2 +0,0 @@
----
-base_docker_image: "{{ 'centos:centos7' if openshift.common.deployment_type == 'origin' else 'rhel7' }}"

+ 0 - 5
roles/dns/handlers/main.yml

@@ -1,5 +0,0 @@
----
-- name: restart bind
-  systemd:
-    name: named
-    state: restarted

+ 0 - 9
roles/dns/meta/main.yml

@@ -1,9 +0,0 @@
----
-galaxy_info:
-  author: Lénaïc Huard
-  description: Deploy and configure a DNS server
-  company: Amadeus SAS
-  license: ASL 2.0
-  min_ansible_version: 2.2
-dependencies:
-- { role: openshift_facts }

+ 0 - 46
roles/dns/tasks/main.yml

@@ -1,46 +0,0 @@
----
-- name: Install Bind
-  package: name=bind state=present
-  when: not openshift.common.is_containerized | bool
-
-- name: Create docker build dir
-  file: path=/tmp/dockerbuild state=directory
-  when: openshift.common.is_containerized | bool
-
-- name: Install dockerfile
-  template:
-    dest: "/tmp/dockerbuild/Dockerfile"
-    src: Dockerfile
-  when: openshift.common.is_containerized | bool
-
-- name: Build Bind image
-  docker_image: path="/tmp/dockerbuild" name="bind" state=present
-  when: openshift.common.is_containerized | bool
-
-- name: Install bind service file
-  template:
-    dest: "/etc/systemd/system/named.service"
-    src: named.service.j2
-  when: openshift.common.is_containerized | bool
-
-- name: Create bind zone dir
-  file: path=/var/named state=directory
-  when: openshift.common.is_containerized | bool
-
-- name: Configure Bind
-  template:
-    src: "{{ item.src }}"
-    dest: "{{ item.dest }}"
-  with_items:
-    - src: openshift-cluster.zone
-      dest: /var/named/openshift-cluster.zone
-    - src: named.conf
-      dest: /etc/named.conf
-  notify: restart bind
-
-- name: Enable Bind
-  systemd:
-    name: named
-    state: started
-    enabled: yes
-    daemon_reload: yes

+ 0 - 11
roles/dns/templates/Dockerfile

@@ -1,11 +0,0 @@
-FROM {{ base_docker_image }}
-MAINTAINER Jan Provaznik <jprovazn@redhat.com>
-
-# install main packages:
-RUN yum -y update; yum clean all;
-RUN yum -y install bind-utils bind
-
-EXPOSE 53
-
-# start services:
-CMD ["/usr/sbin/named", "-f"]

+ 0 - 23
roles/dns/templates/named.conf

@@ -1,23 +0,0 @@
-options
-{
-    directory "/var/named";
-
-    allow-query { {{ ansible_default_ipv4.network }}/24; };
-
-    recursion yes;
-
-{% if dns_forwarders is defined %}
-    forwarders {
-        {% for dns in dns_forwarders %}
-        {{ dns }};
-        {% endfor %}
-    };
-{% endif %}
-};
-{% for zone in dns_zones %}
-
-zone "{{ zone }}" IN {
-    type master;
-    file "openshift-cluster.zone";
-};
-{% endfor %}

+ 0 - 15
roles/dns/templates/named.service.j2

@@ -1,15 +0,0 @@
-[Unit]
-Requires={{ openshift.docker.service_name }}.service
-After={{ openshift.docker.service_name }}.service
-PartOf={{ openshift.docker.service_name }}.service
-
-[Service]
-Type=simple
-TimeoutStartSec=5m
-ExecStartPre=/usr/bin/docker run --rm -v /etc/named.conf:/etc/named.conf -v /var/named:/var/named:z bind named-checkconf -z /etc/named.conf
-ExecStartPre=-/usr/bin/docker rm -f bind
-ExecStart=/usr/bin/docker run --name bind -p 53:53/udp -v /var/log:/var/log -v /etc/named.conf:/etc/named.conf -v /var/named:/var/named:z bind
-ExecStop=/usr/bin/docker stop bind
-
-[Install]
-WantedBy={{ openshift.docker.service_name }}.service

+ 0 - 14
roles/dns/templates/openshift-cluster.zone

@@ -1,14 +0,0 @@
-$TTL 1d
-@               IN      SOA     {{ ansible_hostname }} openshift (
-                                {{ ansible_date_time.epoch }}      ; Serial (To be fixed before 2039)
-                                12h     ; Refresh
-                                3m      ; Retry
-                                4w      ; Expire
-                                3h      ; TTL for negative replies
-                        )
-
-    IN NS {{ ansible_hostname }}
-{{ ansible_hostname }}  IN A  {{ ansible_default_ipv4.address }}
-{% for host in dns_all_hosts %}
-{{ hostvars[host].ansible_hostname }}  IN A  {{ hostvars[host]['ansible_default_ipv4'].address }}
-{% endfor %}