You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.2 KiB

  1. ---
  2. - name: Check ansible version
  3. import_playbook: ansible_version.yml
  4. - hosts: localhost
  5. strategy: linear
  6. vars:
  7. mitogen_version: 0.3.0rc1
  8. mitogen_url: https://github.com/dw/mitogen/archive/v{{ mitogen_version }}.tar.gz
  9. ansible_connection: local
  10. tasks:
  11. - name: Create mitogen plugin dir
  12. file:
  13. path: "{{ item }}"
  14. state: directory
  15. mode: 0755
  16. become: false
  17. loop:
  18. - "{{ playbook_dir }}/plugins/mitogen"
  19. - "{{ playbook_dir }}/dist"
  20. - name: download mitogen release
  21. get_url:
  22. url: "{{ mitogen_url }}"
  23. dest: "{{ playbook_dir }}/dist/mitogen_{{ mitogen_version }}.tar.gz"
  24. validate_certs: true
  25. - name: extract archive
  26. unarchive:
  27. src: "{{ playbook_dir }}/dist/mitogen_{{ mitogen_version }}.tar.gz"
  28. dest: "{{ playbook_dir }}/dist/"
  29. - name: copy plugin
  30. synchronize:
  31. src: "{{ playbook_dir }}/dist/mitogen-{{ mitogen_version }}/"
  32. dest: "{{ playbook_dir }}/plugins/mitogen"
  33. - name: add strategy to ansible.cfg
  34. ini_file:
  35. path: ansible.cfg
  36. section: defaults
  37. option: strategy
  38. value: mitogen_linear
  39. mode: 0644