From dd9a4daaf58df9ce2e2da4388ce554fb3b4a6c10 Mon Sep 17 00:00:00 2001 From: Gael Chamoulaud Date: Mon, 25 Feb 2019 15:08:38 +0100 Subject: [PATCH] Add dns role This patch adds the dns role created from validations/dns.yaml. Change-Id: I6f64bad2f834b372e693f70cf12beaa1288c549c Implements: blueprint validation-framework Signed-off-by: Gael Chamoulaud --- playbooks/dns.yaml | 12 ++++++++++++ roles/dns/defaults/main.yml | 2 ++ roles/dns/meta/main.yml | 28 ++++++++++++++++++++++++++++ roles/dns/tasks/main.yml | 4 ++++ roles/dns/vars/main.yml | 7 +++++++ 5 files changed, 53 insertions(+) create mode 100644 playbooks/dns.yaml create mode 100644 roles/dns/defaults/main.yml create mode 100644 roles/dns/meta/main.yml create mode 100644 roles/dns/tasks/main.yml create mode 100644 roles/dns/vars/main.yml diff --git a/playbooks/dns.yaml b/playbooks/dns.yaml new file mode 100644 index 000000000..475d39b95 --- /dev/null +++ b/playbooks/dns.yaml @@ -0,0 +1,12 @@ +--- +- hosts: undercloud, overcloud + vars: + metadata: + name: Verify DNS + description: > + Verify that the DNS resolution works + groups: + - pre-deployment + server_to_lookup: example.com + roles: + - dns diff --git a/roles/dns/defaults/main.yml b/roles/dns/defaults/main.yml new file mode 100644 index 000000000..bb0cae8fe --- /dev/null +++ b/roles/dns/defaults/main.yml @@ -0,0 +1,2 @@ +--- +server_to_lookup: example.com diff --git a/roles/dns/meta/main.yml b/roles/dns/meta/main.yml new file mode 100644 index 000000000..c88e2edb0 --- /dev/null +++ b/roles/dns/meta/main.yml @@ -0,0 +1,28 @@ +galaxy_info: + author: TripleO Validations Team + company: Red Hat + license: Apache + min_ansible_version: 2.4 + + platforms: + - name: CentOS + versions: + - 7 + - name: RHEL + versions: + - 7 + + categories: + - cloud + - baremetal + - system + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] diff --git a/roles/dns/tasks/main.yml b/roles/dns/tasks/main.yml new file mode 100644 index 000000000..b78292bb5 --- /dev/null +++ b/roles/dns/tasks/main.yml @@ -0,0 +1,4 @@ +--- +- name: Ensure DNS resolution works + command: "getent hosts {{ server_to_lookup }}" + changed_when: False diff --git a/roles/dns/vars/main.yml b/roles/dns/vars/main.yml new file mode 100644 index 000000000..e3e6f3859 --- /dev/null +++ b/roles/dns/vars/main.yml @@ -0,0 +1,7 @@ +--- +metadata: + name: Verify DNS + description: > + Verify that the DNS resolution works + groups: + - pre-deployment