| 1 | --- |
| 2 | |
| 3 | - name: Check if pip is installed |
| 4 | shell: "which pip" |
| 5 | register: which_pip |
| 6 | ignore_errors: true |
| 7 | |
| 8 | - name: Install pip |
| 9 | package: |
| 10 | name: python-pip |
| 11 | state: present |
| 12 | when: which_pip|failed |
| 13 | become: true |
| 14 | |
| 15 | - name: Install rsync |
| 16 | package: |
| 17 | name: rsync |
| 18 | state: present |
| 19 | become: true |
| 20 | |
| 21 | - name: Copy cyborg to host |
| 22 | synchronize: |
| 23 | src: ../../../cyborg/ |
| 24 | dest: /tmp/cyborg |
| 25 | use_ssh_args: yes |
| 26 | |
| 27 | - name: Remove old Cyborg if installed |
| 28 | pip: |
| 29 | name: cyborg |
| 30 | state: absent |
| 31 | become: true |
| 32 | ignore_errors: true |
| 33 | |
| 34 | - name: Install Cyborg using pip |
| 35 | pip: |
| 36 | name: /tmp/cyborg |
| 37 | state: present |
| 38 | become: true |