summaryrefslogtreecommitdiffstats
path: root/cyborg_enhancement/mitaka_version/cyborg/setup/roles/install_package/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'cyborg_enhancement/mitaka_version/cyborg/setup/roles/install_package/tasks/main.yml')
-rw-r--r--cyborg_enhancement/mitaka_version/cyborg/setup/roles/install_package/tasks/main.yml38
1 files changed, 38 insertions, 0 deletions
diff --git a/cyborg_enhancement/mitaka_version/cyborg/setup/roles/install_package/tasks/main.yml b/cyborg_enhancement/mitaka_version/cyborg/setup/roles/install_package/tasks/main.yml
new file mode 100644
index 0000000..561cc1c
--- /dev/null
+++ b/cyborg_enhancement/mitaka_version/cyborg/setup/roles/install_package/tasks/main.yml
@@ -0,0 +1,38 @@
+---
+
+- name: Check if pip is installed
+ shell: "which pip"
+ register: which_pip
+ ignore_errors: true
+
+- name: Install pip
+ package:
+ name: python-pip
+ state: present
+ when: which_pip|failed
+ become: true
+
+- name: Install rsync
+ package:
+ name: rsync
+ state: present
+ become: true
+
+- name: Copy cyborg to host
+ synchronize:
+ src: ../../../cyborg/
+ dest: /tmp/cyborg
+ use_ssh_args: yes
+
+- name: Remove old Cyborg if installed
+ pip:
+ name: cyborg
+ state: absent
+ become: true
+ ignore_errors: true
+
+- name: Install Cyborg using pip
+ pip:
+ name: /tmp/cyborg
+ state: present
+ become: true