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.

33 lines
785 B

  1. ---
  2. # raw: cat /etc/issue.net | grep '{{ bootstrap_versions }}'
  3. - name: List ubuntu_packages
  4. set_fact:
  5. ubuntu_packages:
  6. - python
  7. - python-apt
  8. - python-pip
  9. - dbus
  10. - name: Bootstrap | Check if bootstrap is needed
  11. raw: dpkg -l | cut -d' ' -f3 |grep -e ^{{item}}$
  12. register: need_bootstrap
  13. failed_when: false
  14. changed_when: false
  15. with_items: "{{ubuntu_packages}}"
  16. environment: {}
  17. tags:
  18. - facts
  19. - name: Bootstrap | Install python 2.x and pip
  20. raw:
  21. apt-get update && \
  22. DEBIAN_FRONTEND=noninteractive apt-get install -y {{ubuntu_packages | join(" ")}}
  23. environment: {}
  24. when:
  25. - need_bootstrap.results | map(attribute='rc') | sort | last | bool
  26. - set_fact:
  27. ansible_python_interpreter: "/usr/bin/python"
  28. tags:
  29. - facts