aboutsummaryrefslogtreecommitdiffstats
path: root/qtip/driver/playbook/prepare_env.yaml
diff options
context:
space:
mode:
authorwu.zhihui <wu.zhihui1@zte.com.cn>2017-03-02 18:40:11 +0800
committerzhihui wu <zhihui.wu2006+zte@gmail.com>2017-03-03 00:53:59 +0000
commit7433b1c89e2ffba3b097832f353146f12987e6dd (patch)
tree2e99d8a91417414d4cce6dd299d918a604e4d206 /qtip/driver/playbook/prepare_env.yaml
parent473deae9a10162f000c49ca49b4e31b28c4bf0d8 (diff)
Refactor dhrystone playbook
- Break previous one playbook into three playbooks: setup.yaml: setup test environment. run.yaml: execute test steps clean.yaml: cleanup test environment to restore environment The advantage is cleaning part will never be blocked by another. - Just do testing on remote hosts, parse logfile on localhost. - Use ansible module instead of shell command. - Move up all files under /ansible and remove ansible directory. Under /ansible, ansible package cann't be imported. Change-Id: I43c65be23869b7d42ca769994d4decb9a012d196 Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn>
Diffstat (limited to 'qtip/driver/playbook/prepare_env.yaml')
-rw-r--r--qtip/driver/playbook/prepare_env.yaml54
1 files changed, 54 insertions, 0 deletions
diff --git a/qtip/driver/playbook/prepare_env.yaml b/qtip/driver/playbook/prepare_env.yaml
new file mode 100644
index 00000000..1ec71520
--- /dev/null
+++ b/qtip/driver/playbook/prepare_env.yaml
@@ -0,0 +1,54 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+- name: Epel Release install when CentOS
+ yum:
+ name: epel-release
+ state: present
+ when: ansible_os_family == "RedHat"
+
+- name: Software Properties Common
+ apt:
+ name: software-properties-common
+ state: present
+ when: ansible_os_family == "Debian"
+
+- name: Adding ubuntu backport main repo
+ apt_repository:
+ repo: deb http://archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}}-backports main restricted universe multiverse
+ state: present
+ when: ansible_os_family == "Debian"
+
+- name: Adding ubuntu main repo
+ apt_repository:
+ repo: deb http://archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}} main restricted universe multiverse
+ when: ansible_os_family == "Debian"
+
+- name: Install ansible copy dependencies if remote host has selinux enabled
+ yum:
+ name: libselinux-python
+ state: present
+ when: ansible_os_family == "RedHat"
+
+- name: Install ansiblle copy dependencies if remote host has selinux enaled
+ apt:
+ name: python-selinux
+ state: present
+ when: ansible_os_family == "Debian"
+
+- name: Install rsync when CentOS
+ yum:
+ name: rsync
+ state: present
+ when: ansible_os_family == "RedHat"
+
+- name: Install rsync when Ubuntu
+ apt:
+ name: rsync
+ state: present
+ when: ansible_os_family == "Debian"