Fix bug on apex 37/33637/1
authorYujun Zhang <zhang.yujunz@zte.com.cn>
Fri, 21 Apr 2017 10:48:35 +0000 (18:48 +0800)
committerYujun Zhang <zhang.yujunz@zte.com.cn>
Fri, 21 Apr 2017 23:53:11 +0000 (07:53 +0800)
missing repository configuration and packages

Change-Id: I929e3bafced56b2ab8fd90edc21421bd7bde2073
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
resources/roles/qtip-deps/tasks/debian.yml [new file with mode: 0644]
resources/roles/qtip-deps/tasks/main.yml [moved from resources/roles/development-tools/tasks/main.yml with 72% similarity]
resources/roles/qtip-deps/tasks/redhat.yml [moved from resources/roles/nDPI/meta/main.yml with 58% similarity]
resources/roles/qtip-workspace/files/copy/run.yml
resources/roles/qtip-workspace/files/render/ansible.cfg
resources/roles/ramspeed/meta/main.yml [deleted file]
resources/roles/unixbench/meta/main.yml [deleted file]
tests/integration/workspace-create.yml

diff --git a/resources/roles/qtip-deps/tasks/debian.yml b/resources/roles/qtip-deps/tasks/debian.yml
new file mode 100644 (file)
index 0000000..1e15a68
--- /dev/null
@@ -0,0 +1,33 @@
+##############################################################################
+# 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: Installing software properties common
+  apt:
+    name: "{{ item }}"
+    state: present
+  with_items:
+    - software-properties-common
+
+- name: Adding ubuntu backport main repo
+  apt_repository:
+    repo: "{{ item }}"
+    state: present
+  with_items:
+    - deb http://archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}}-backports  main restricted universe multiverse
+    - deb http://archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}} main restricted universe multiverse
+
+- name: Installing required software
+  apt:
+    name: "{{ item }}"
+    state: present
+  with_items:
+    - build-essentials
+    - python-selinux
+    - libpcap-dev
similarity index 72%
rename from resources/roles/development-tools/tasks/main.yml
rename to resources/roles/qtip-deps/tasks/main.yml
index 5fcb19d..3e88579 100644 (file)
@@ -7,17 +7,17 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
-- name: install development tools for Debian family
-  package:
-    name: build-essential
-    state: present
+---
+- include: redhat.yml
+  when: ansible_os_family == "RedHat"
+
+- include: debian.yml
   when: ansible_os_family == "Debian"
 
-- name: install development tools for RedHat family
-  yum:
-    name: '{{ item }}'
+- name: Installing required packages
+  package:
+    name: "{{ item }}"
     state: present
-  when: ansible_os_family == "RedHat"
   with_items:
-    - "@Development tools"
-    - gcc-c++
+    - rsync
+    - git
similarity index 58%
rename from resources/roles/nDPI/meta/main.yml
rename to resources/roles/qtip-deps/tasks/redhat.yml
index 03c96c4..6a53aac 100644 (file)
@@ -1,12 +1,24 @@
-#############################################################################
+##############################################################################
 # 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
-#############################################################################
+##############################################################################
 
 ---
-dependencies:
-  - { role: development-tools }
+- name: Installing epel release
+  yum:
+    name: epel-release
+    state: present
+
+- name: Installing required packages
+  yum:
+    name: "{{ item }}"
+    state: present
+  with_items:
+    - "@Development tools"
+    - gcc-c++
+    - libselinux-python
+    - libpcap-devel
index f84ea46..d0f452a 100644 (file)
@@ -27,7 +27,7 @@
     delegate_to: localhost
 
   roles:
-  - development-tools
+  - qtip-deps
 
   tags: [setup]
 
index 8616fa9..1e4d04f 100644 (file)
@@ -239,7 +239,7 @@ filter_plugins     = {{ qtip_package }}/qtip/ansible_library/plugins/filter
 # when looping. Instead of calling the module once per with_ item, the
 # module is called once with all items at once. Currently this only works
 # under limited circumstances, and only with parameters named 'name'.
-#squash_actions = apk,apt,dnf,homebrew,pacman,pkgng,yum,zypper
+squash_actions = apk,apt,dnf,homebrew,pacman,pkgng,yum,zypper
 
 # prevents logging of task data, off by default
 #no_log = False
diff --git a/resources/roles/ramspeed/meta/main.yml b/resources/roles/ramspeed/meta/main.yml
deleted file mode 100644 (file)
index 03c96c4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#############################################################################
-# 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
-#############################################################################
-
----
-dependencies:
-  - { role: development-tools }
diff --git a/resources/roles/unixbench/meta/main.yml b/resources/roles/unixbench/meta/main.yml
deleted file mode 100644 (file)
index 03c96c4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#############################################################################
-# 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
-#############################################################################
-
----
-dependencies:
-  - { role: development-tools }
index 1b47326..ad4ff7f 100644 (file)
@@ -20,8 +20,8 @@
 
       # opnfv environment
 
-      installer: fuel         # <fuel|apex>
-      installer_master_host: f5    # make sure you can login it with key authentication
+      installer: apex         # <fuel|apex>
+      installer_master_host: apex-virtual    # make sure you can login it with key authentication
 
       # set testapi_url to enable reportint to testapi