summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
authorMichal Zegan <m.zegan@samsung.com>2019-06-05 15:45:55 +0200
committerMichal Zegan <m.zegan@samsung.com>2019-06-05 15:45:55 +0200
commitbd8e91fce87ac6b10e1e9ed3781820aa81884b44 (patch)
treeb01ca41bea0dedc40464d54ae5f7a8d6f171d1ed /ansible
parentd3cb6429d6d3cdcd625906e702140a51fc146847 (diff)
Use the original playbook in play-resources tests
This commit includes the original resources.yml playbook by using import_playbook. Some modifications were needed mostly because of the way import_playbook works. Also moved the setup role call to prepare. Change-Id: I8745d5e43fd2050d47970c7d19bbbc4db8a5847f Issue-ID: OOM-1912 Signed-off-by: Michal Zegan <m.zegan@samsung.com>
Diffstat (limited to 'ansible')
-rw-r--r--ansible/test/play-resources/molecule/default/playbook.yml10
-rw-r--r--ansible/test/play-resources/molecule/default/prepare.yml3
-rw-r--r--ansible/test/play-resources/molecule/default/vars.yml (renamed from ansible/test/play-resources/molecule/default/group_vars/all.yml)2
-rw-r--r--ansible/test/play-resources/molecule/nfs/molecule.yml5
-rw-r--r--ansible/test/play-resources/molecule/nfs/playbook.yml12
-rw-r--r--ansible/test/play-resources/molecule/nfs/prepare.yml8
-rw-r--r--ansible/test/play-resources/molecule/nfs/vars.yml7
7 files changed, 27 insertions, 20 deletions
diff --git a/ansible/test/play-resources/molecule/default/playbook.yml b/ansible/test/play-resources/molecule/default/playbook.yml
index 50ba233a..096077a2 100644
--- a/ansible/test/play-resources/molecule/default/playbook.yml
+++ b/ansible/test/play-resources/molecule/default/playbook.yml
@@ -1,6 +1,8 @@
---
-- name: Test resource transfer with ssh
+- name: Initialize
hosts: all
- roles:
- - setup
- - resource-data
+ tasks:
+ - name: Include variables
+ include_vars: vars.yml
+
+- import_playbook: ../../../../resources.yml
diff --git a/ansible/test/play-resources/molecule/default/prepare.yml b/ansible/test/play-resources/molecule/default/prepare.yml
index a4436001..5c8ae654 100644
--- a/ansible/test/play-resources/molecule/default/prepare.yml
+++ b/ansible/test/play-resources/molecule/default/prepare.yml
@@ -2,4 +2,7 @@
- name: Prepare resource-data
hosts: all
roles:
+ - setup
- prepare-resource-data
+ vars_files:
+ - vars.yml
diff --git a/ansible/test/play-resources/molecule/default/group_vars/all.yml b/ansible/test/play-resources/molecule/default/vars.yml
index 558eacb2..46ab3e04 100644
--- a/ansible/test/play-resources/molecule/default/group_vars/all.yml
+++ b/ansible/test/play-resources/molecule/default/vars.yml
@@ -1,5 +1,5 @@
---
-app_data_path: /opt/myleculeapp
+app_data_path: /opt/moleculeapp
aux_data_path: "{{ app_data_path }}/runtime_images_source_dir"
resources_dir: /data
resources_filename: resources_package.tar
diff --git a/ansible/test/play-resources/molecule/nfs/molecule.yml b/ansible/test/play-resources/molecule/nfs/molecule.yml
index 9cff6b8d..11726396 100644
--- a/ansible/test/play-resources/molecule/nfs/molecule.yml
+++ b/ansible/test/play-resources/molecule/nfs/molecule.yml
@@ -32,13 +32,8 @@ platforms:
- name: resource-data
provisioner:
name: ansible
- playbooks:
- cleanup: ../default/cleanup.yml
env:
ANSIBLE_ROLES_PATH: ../../../../roles:../../../roles
- inventory:
- links:
- group_vars: ../default/group_vars
lint:
name: ansible-lint
verifier:
diff --git a/ansible/test/play-resources/molecule/nfs/playbook.yml b/ansible/test/play-resources/molecule/nfs/playbook.yml
index 88440116..096077a2 100644
--- a/ansible/test/play-resources/molecule/nfs/playbook.yml
+++ b/ansible/test/play-resources/molecule/nfs/playbook.yml
@@ -1,8 +1,8 @@
---
-- name: Test resource transfer with nfs
+- name: Initialize
hosts: all
- roles:
- - setup
- - role: resource-data
- vars:
- resources_on_nfs: true
+ tasks:
+ - name: Include variables
+ include_vars: vars.yml
+
+- import_playbook: ../../../../resources.yml
diff --git a/ansible/test/play-resources/molecule/nfs/prepare.yml b/ansible/test/play-resources/molecule/nfs/prepare.yml
index d381ba77..2276f2e8 100644
--- a/ansible/test/play-resources/molecule/nfs/prepare.yml
+++ b/ansible/test/play-resources/molecule/nfs/prepare.yml
@@ -1,7 +1,7 @@
---
-- name: Prepare resource-data
+- name: Prepare
hosts: all
roles:
- - role: prepare-resource-data
- vars:
- resources_on_nfs: true
+ - prepare-resource-data
+ vars_files:
+ - vars.yml
diff --git a/ansible/test/play-resources/molecule/nfs/vars.yml b/ansible/test/play-resources/molecule/nfs/vars.yml
new file mode 100644
index 00000000..2cc4d258
--- /dev/null
+++ b/ansible/test/play-resources/molecule/nfs/vars.yml
@@ -0,0 +1,7 @@
+---
+app_data_path: /opt/moleculeapp
+aux_data_path: "{{ app_data_path }}/runtime_images_source_dir"
+resources_on_nfs: true
+resources_dir: /data
+resources_filename: resources_package.tar
+aux_resources_filename: aux_resources_package.tar