2019-04-01 17:38:33 +08:00
|
|
|
---
|
2018-10-31 18:52:47 +08:00
|
|
|
- hosts: localhost
|
|
|
|
strategy: linear
|
|
|
|
vars:
|
|
|
|
mitogen_version: master
|
2019-05-03 05:24:21 +08:00
|
|
|
mitogen_url: https://github.com/dw/mitogen/archive/{{ mitogen_version }}.zip
|
2018-10-31 18:52:47 +08:00
|
|
|
tasks:
|
|
|
|
- name: Create mitogen plugin dir
|
|
|
|
file:
|
2019-05-03 05:24:21 +08:00
|
|
|
path: "{{ item }}"
|
2018-10-31 18:52:47 +08:00
|
|
|
state: directory
|
|
|
|
become: false
|
|
|
|
loop:
|
2019-05-03 05:24:21 +08:00
|
|
|
- "{{ playbook_dir }}/plugins/mitogen"
|
|
|
|
- "{{ playbook_dir }}/dist"
|
2018-10-31 18:52:47 +08:00
|
|
|
|
|
|
|
- name: download mitogen release
|
|
|
|
get_url:
|
2019-05-03 05:24:21 +08:00
|
|
|
url: "{{ mitogen_url }}"
|
|
|
|
dest: "{{ playbook_dir }}/dist/mitogen_{{ mitogen_version }}.zip"
|
2018-10-31 18:52:47 +08:00
|
|
|
validate_certs: true
|
|
|
|
|
|
|
|
- name: extract zip
|
|
|
|
unarchive:
|
2019-05-03 05:24:21 +08:00
|
|
|
src: "{{ playbook_dir }}/dist/mitogen_{{ mitogen_version }}.zip"
|
|
|
|
dest: "{{ playbook_dir }}/dist/"
|
2018-10-31 18:52:47 +08:00
|
|
|
|
|
|
|
- name: copy plugin
|
|
|
|
synchronize:
|
2019-05-03 05:24:21 +08:00
|
|
|
src: "{{ playbook_dir }}/dist/mitogen-{{ mitogen_version }}/"
|
|
|
|
dest: "{{ playbook_dir }}/plugins/mitogen"
|