36 lines
995 B
YAML
36 lines
995 B
YAML
---
|
|
- name: Check ansible version
|
|
import_playbook: ansible_version.yml
|
|
|
|
- hosts: localhost
|
|
strategy: linear
|
|
vars:
|
|
mitogen_version: master
|
|
mitogen_url: https://github.com/dw/mitogen/archive/{{ mitogen_version }}.zip
|
|
ansible_connection: local
|
|
tasks:
|
|
- name: Create mitogen plugin dir
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
become: false
|
|
loop:
|
|
- "{{ playbook_dir }}/plugins/mitogen"
|
|
- "{{ playbook_dir }}/dist"
|
|
|
|
- name: download mitogen release
|
|
get_url:
|
|
url: "{{ mitogen_url }}"
|
|
dest: "{{ playbook_dir }}/dist/mitogen_{{ mitogen_version }}.zip"
|
|
validate_certs: true
|
|
|
|
- name: extract zip
|
|
unarchive:
|
|
src: "{{ playbook_dir }}/dist/mitogen_{{ mitogen_version }}.zip"
|
|
dest: "{{ playbook_dir }}/dist/"
|
|
|
|
- name: copy plugin
|
|
synchronize:
|
|
src: "{{ playbook_dir }}/dist/mitogen-{{ mitogen_version }}/"
|
|
dest: "{{ playbook_dir }}/plugins/mitogen"
|