2019-04-01 09:38:33 +00:00
|
|
|
---
|
2020-04-22 20:33:44 +00:00
|
|
|
- name: Check ansible version
|
|
|
|
import_playbook: ansible_version.yml
|
|
|
|
|
2018-10-31 10:52:47 +00:00
|
|
|
- hosts: localhost
|
|
|
|
strategy: linear
|
|
|
|
vars:
|
2020-04-24 12:20:07 +00:00
|
|
|
mitogen_version: 0.2.9
|
|
|
|
mitogen_url: https://github.com/dw/mitogen/archive/v{{ mitogen_version }}.tar.gz
|
2020-04-22 20:33:44 +00:00
|
|
|
ansible_connection: local
|
2018-10-31 10:52:47 +00:00
|
|
|
tasks:
|
|
|
|
- name: Create mitogen plugin dir
|
|
|
|
file:
|
2019-05-02 21:24:21 +00:00
|
|
|
path: "{{ item }}"
|
2018-10-31 10:52:47 +00:00
|
|
|
state: directory
|
|
|
|
become: false
|
|
|
|
loop:
|
2019-05-02 21:24:21 +00:00
|
|
|
- "{{ playbook_dir }}/plugins/mitogen"
|
|
|
|
- "{{ playbook_dir }}/dist"
|
2018-10-31 10:52:47 +00:00
|
|
|
|
|
|
|
- name: download mitogen release
|
|
|
|
get_url:
|
2019-05-02 21:24:21 +00:00
|
|
|
url: "{{ mitogen_url }}"
|
2020-04-24 12:20:07 +00:00
|
|
|
dest: "{{ playbook_dir }}/dist/mitogen_{{ mitogen_version }}.tar.gz"
|
2018-10-31 10:52:47 +00:00
|
|
|
validate_certs: true
|
|
|
|
|
2020-04-24 12:20:07 +00:00
|
|
|
- name: extract archive
|
2018-10-31 10:52:47 +00:00
|
|
|
unarchive:
|
2020-04-24 12:20:07 +00:00
|
|
|
src: "{{ playbook_dir }}/dist/mitogen_{{ mitogen_version }}.tar.gz"
|
2019-05-02 21:24:21 +00:00
|
|
|
dest: "{{ playbook_dir }}/dist/"
|
2018-10-31 10:52:47 +00:00
|
|
|
|
|
|
|
- name: copy plugin
|
|
|
|
synchronize:
|
2019-05-02 21:24:21 +00:00
|
|
|
src: "{{ playbook_dir }}/dist/mitogen-{{ mitogen_version }}/"
|
|
|
|
dest: "{{ playbook_dir }}/plugins/mitogen"
|
2020-04-24 12:20:07 +00:00
|
|
|
|
|
|
|
- name: add strategy to ansible.cfg
|
|
|
|
ini_file:
|
|
|
|
path: ansible.cfg
|
|
|
|
section: defaults
|
|
|
|
option: strategy
|
|
|
|
value: mitogen_linear
|