A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 1 | --- |
| 2 | - hosts: localhost |
| 3 | tasks: |
| 4 | - name: Archive cord tester files |
| 5 | local_action: shell tar -cvzf /tmp/cord-tester.tar.gz ../cord-tester --exclude=.git |
| 6 | |
| 7 | - hosts: all |
| 8 | tasks: |
| 9 | - name: Unarchive cord tester files |
| 10 | unarchive: |
| 11 | src=/tmp/cord-tester.tar.gz |
| 12 | dest=/home/{{ ansible_user }} |
| 13 | owner={{ ansible_user }} |
| 14 | group={{ ansible_user }} |
| 15 | |
| 16 | - name: Cleanup remote archive files |
| 17 | file: |
| 18 | path=/home/{{ ansible_user }}/.ansible state=absent |
| 19 | |
| 20 | - hosts: localhost |
| 21 | tasks: |
| 22 | - name: Cleanup local archive files |
| 23 | file: |
| 24 | path=/tmp/cord-tester.tar.gz state=absent |
| 25 | |
| 26 | - name: Run prerequisites on head node |
| 27 | hosts: all |
| 28 | roles: |
| 29 | - prereq |