aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-19 14:52:55 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-20 11:33:38 +0800
commitac8c825582a56bba3a1d1c966322f80aa93fe137 (patch)
tree1ac7df551b1cda1d193d8d7dd6028f044352803f
parent88f4e7f34bda4fbfc4ee6d513ffbec772037be1f (diff)
Use ansible roles to setup development tools
Change-Id: I897773edf8dcacf08e67fa3eb999c4c10ba22805 Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
-rw-r--r--resources/metric/nDPI.yaml20
-rw-r--r--resources/roles/development-tools/tasks/main.yml23
l---------tests/integration/roles1
-rw-r--r--tests/integration/run.yaml9
4 files changed, 33 insertions, 20 deletions
diff --git a/resources/metric/nDPI.yaml b/resources/metric/nDPI.yaml
index 41bedc3d..b3e7259f 100644
--- a/resources/metric/nDPI.yaml
+++ b/resources/metric/nDPI.yaml
@@ -16,26 +16,6 @@
run_once: yes
delegate_to: localhost
-- name: installing nDPI dependencies if CentOS
- yum:
- name: '{{ item }}'
- state: present
- when: ansible_os_family == "RedHat"
- with_items:
- - git
- - gcc
- - patch
- - perl-Time-HiRes
- - autofconf
- - automake
- - libpcap-devel libtool
-
-- name: installing nDPI dependencies if Ubuntu
- apt:
- name: build-essential
- state: present
- when: ansible_os_family == "Debian"
-
- name: making nDPI temporary directory
file:
path: "{{ nDPI_cwd }}"
diff --git a/resources/roles/development-tools/tasks/main.yml b/resources/roles/development-tools/tasks/main.yml
new file mode 100644
index 00000000..5fcb19db
--- /dev/null
+++ b/resources/roles/development-tools/tasks/main.yml
@@ -0,0 +1,23 @@
+##############################################################################
+# 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: install development tools for Debian family
+ package:
+ name: build-essential
+ state: present
+ when: ansible_os_family == "Debian"
+
+- name: install development tools for RedHat family
+ yum:
+ name: '{{ item }}'
+ state: present
+ when: ansible_os_family == "RedHat"
+ with_items:
+ - "@Development tools"
+ - gcc-c++
diff --git a/tests/integration/roles b/tests/integration/roles
new file mode 120000
index 00000000..a2363eeb
--- /dev/null
+++ b/tests/integration/roles
@@ -0,0 +1 @@
+../../resources/roles \ No newline at end of file
diff --git a/tests/integration/run.yaml b/tests/integration/run.yaml
index 5c74a478..bab88d73 100644
--- a/tests/integration/run.yaml
+++ b/tests/integration/run.yaml
@@ -16,6 +16,15 @@
tasks:
- name: check ssh connection
ping:
+ tags: [setup]
+
+- hosts: compute
+ roles:
+ - development-tools
+ tags: [setup]
+
+- hosts: compute
+ tasks:
- name: collect system information
include: "{{ qtip_resources }}/metric/inxi.yaml"
- name: ssl metrics