main.yml 746 B

123456789101112131415161718192021222324252627282930
  1. - name: Add python3 repository
  2. become: true
  3. ansible.builtin.apt_repository:
  4. repo: ppa:deadsnakes/ppa
  5. - name: make sure {{ app_downloads }} exists
  6. become: true
  7. file:
  8. state: absent
  9. path: "{{ app_downloads }}"
  10. # https://pip.pypa.io/en/stable/installation/
  11. - name: Download get-pip
  12. get_url:
  13. url: https://bootstrap.pypa.io/get-pip.py
  14. dest: "{{ app_downloads }}/get-pip.py"
  15. mode: 0644
  16. - name: Run get-pip
  17. ansible.builtin.command: "python3{{ app_python_version }} {{ app_downloads }}/get-pip.py"
  18. args:
  19. creates: "{{ ansible_env.HOME }}/.local/bin/pip"
  20. - name: Install python packages
  21. pip:
  22. name:
  23. - cmake
  24. - boto3
  25. extra_args: --user
  26. executable: "{{ ansible_env.HOME }}/.local/bin/pip"