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.

42 lines
1.1 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.2.9
  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. become: false
  16. loop:
  17. - "{{ playbook_dir }}/plugins/mitogen"
  18. - "{{ playbook_dir }}/dist"
  19. - name: download mitogen release
  20. get_url:
  21. url: "{{ mitogen_url }}"
  22. dest: "{{ playbook_dir }}/dist/mitogen_{{ mitogen_version }}.tar.gz"
  23. validate_certs: true
  24. - name: extract archive
  25. unarchive:
  26. src: "{{ playbook_dir }}/dist/mitogen_{{ mitogen_version }}.tar.gz"
  27. dest: "{{ playbook_dir }}/dist/"
  28. - name: copy plugin
  29. synchronize:
  30. src: "{{ playbook_dir }}/dist/mitogen-{{ mitogen_version }}/"
  31. dest: "{{ playbook_dir }}/plugins/mitogen"
  32. - name: add strategy to ansible.cfg
  33. ini_file:
  34. path: ansible.cfg
  35. section: defaults
  36. option: strategy
  37. value: mitogen_linear