summaryrefslogtreecommitdiffstats
path: root/ansible/roles/dns
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/dns')
l---------ansible/roles/dns/molecule/ubuntu/group_vars1
-rw-r--r--ansible/roles/dns/molecule/ubuntu/molecule.yml42
-rw-r--r--ansible/roles/dns/tasks/main.yml6
3 files changed, 49 insertions, 0 deletions
diff --git a/ansible/roles/dns/molecule/ubuntu/group_vars b/ansible/roles/dns/molecule/ubuntu/group_vars
new file mode 120000
index 00000000..e04e088f
--- /dev/null
+++ b/ansible/roles/dns/molecule/ubuntu/group_vars
@@ -0,0 +1 @@
+../../../../group_vars/ \ No newline at end of file
diff --git a/ansible/roles/dns/molecule/ubuntu/molecule.yml b/ansible/roles/dns/molecule/ubuntu/molecule.yml
new file mode 100644
index 00000000..5428c04a
--- /dev/null
+++ b/ansible/roles/dns/molecule/ubuntu/molecule.yml
@@ -0,0 +1,42 @@
+---
+dependency:
+ name: galaxy
+driver:
+ name: docker
+lint:
+ name: yamllint
+platforms:
+ - name: infrastructure-server
+ image: molecule-${PREBUILD_PLATFORM_DISTRO:-ubuntu}:${PREBUILD_DISTRO_VERSION:-18.04}
+ pre_build_image: True
+ privileged: true
+ override_command: False
+ groups:
+ - infrastructure
+ volumes:
+ - /var/lib/docker
+provisioner:
+ name: ansible
+ lint:
+ name: ansible-lint
+ env:
+ ANSIBLE_ROLES_PATH: ../../../../test/roles
+ ANSIBLE_LIBRARY: ../../../../library
+ playbooks:
+ prepare: ../default/prepare.yml
+ converge: ../default/playbook.yml
+ cleanup: ../default/cleanup.yml
+ inventory:
+ host_vars:
+ infrastructure-server:
+ cluster_ip: 127.0.0.1
+ group_vars:
+ all:
+ app_name: onap
+ app_data_path: "/opt/{{ app_name }}"
+scenario:
+ name: ubuntu
+verifier:
+ name: testinfra
+ lint:
+ name: flake8
diff --git a/ansible/roles/dns/tasks/main.yml b/ansible/roles/dns/tasks/main.yml
index 8a7f8bca..bfdd83b4 100644
--- a/ansible/roles/dns/tasks/main.yml
+++ b/ansible/roles/dns/tasks/main.yml
@@ -4,6 +4,12 @@
path: "{{ app_data_path }}/cfg"
state: directory
+- name: Stop systemd-resolved daemon - Ubuntu
+ systemd:
+ name: systemd-resolved
+ state: stopped
+ when: ansible_distribution in ["Ubuntu","Debian"]
+
- name: Create simulated hostnames file
template:
src: simulated_hosts.j2