install-dependencies-playbook.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. - hosts: 127.0.0.1
  2. user: root
  3. become: yes
  4. become_method: sudo
  5. tasks:
  6. - name: install pip on Debian
  7. block:
  8. - name: install pip using apt
  9. apt: name=python-pip state=present
  10. when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
  11. - name: install pip on Mac
  12. block:
  13. - name: create temporary folder
  14. file:
  15. path: ../../.tmp
  16. state: directory
  17. - name: get pip installer using curl
  18. get_url:
  19. url: https://bootstrap.pypa.io/get-pip.py
  20. dest: ../../.tmp/get-pip.py
  21. - name: install pip
  22. shell: python ../../.tmp/get-pip.py
  23. when: ansible_distribution == 'MacOSX'
  24. always:
  25. - name: remove pip installer script
  26. file:
  27. path: ../../.tmp/get-pip.py
  28. state: absent
  29. - name: install docker
  30. pip: name=docker
  31. - name: Install yarn with npm
  32. npm:
  33. name: yarn
  34. global: yes
  35. - name: Install docker compose
  36. pip: name=docker-compose