aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/roles/install_yardstick/tasks/main.yml
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-06-21 12:42:55 +0100
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-06-21 12:43:35 +0100
commit6cc6b8a477fc3f7a32a11af4f6a6dc76b5fac83f (patch)
tree9471eb357c7390b4f028182dc3ea6038a47ca83a /ansible/roles/install_yardstick/tasks/main.yml
parent0c53e91c61c358ae43371aba92eccd1dde5829e6 (diff)
Fix pip install issues in install.yaml script
For long executing commands, ansible should use async jobs. For example, when installing the project requirements. There is a problem in ansible pip module when using a "editable installs". This command should be called with "editable" flag. JIRA: YARDSTICK-1250 Change-Id: I6d29bab2f388373e252d065ff5aa0c459a8f265a Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Diffstat (limited to 'ansible/roles/install_yardstick/tasks/main.yml')
-rw-r--r--ansible/roles/install_yardstick/tasks/main.yml37
1 files changed, 33 insertions, 4 deletions
diff --git a/ansible/roles/install_yardstick/tasks/main.yml b/ansible/roles/install_yardstick/tasks/main.yml
index ee1b83756..973b2b027 100644
--- a/ansible/roles/install_yardstick/tasks/main.yml
+++ b/ansible/roles/install_yardstick/tasks/main.yml
@@ -37,10 +37,39 @@
# name: pip
# state: latest
-- name: install yardstick without virtual environment
- include_tasks: regular_install.yml
+- name: Install Yardstick requirements (venv)
+ pip:
+ requirements: "{{ yardstick_dir }}/requirements.txt"
+ virtualenv: "{{ yardstick_dir }}/virtualenv"
+ async: 300
+ poll: 0
+ register: pip_installer
+ when: virtual_environment == True
+
+- name: Install Yardstick requirements
+ pip:
+ requirements: "{{ yardstick_dir }}/requirements.txt"
+ async: 300
+ poll: 0
+ register: pip_installer
when: virtual_environment == False
-- name: install yardstick with virtual environment
- include_tasks: virtual_install.yml
+- name: Check install Yardstick requirements
+ async_status:
+ jid: "{{ pip_installer.ansible_job_id }}"
+ register: job_result
+ until: job_result.finished
+ retries: 100
+
+- name: Install Yardstick code (venv)
+ pip:
+ name: "{{ yardstick_dir }}/"
+ editable: True
+ virtualenv: "{{ yardstick_dir }}/virtualenv"
when: virtual_environment == True
+
+- name: Install Yardstick code
+ pip:
+ name: "{{ yardstick_dir }}/"
+ editable: True
+ when: virtual_environment == False