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.

32 lines
750 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. tags:
  17. - facts
  18. - name: Bootstrap | Install python 2.x and pip
  19. raw:
  20. apt-get update && \
  21. DEBIAN_FRONTEND=noninteractive apt-get install -y {{ubuntu_packages | join(" ")}}
  22. when:
  23. - need_bootstrap.results | map(attribute='rc') | sort | last | bool
  24. - set_fact:
  25. ansible_python_interpreter: "/usr/bin/python"
  26. tags:
  27. - facts