Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

42 строки
1.2 KiB

  1. ---
  2. - name: Ensure APT usage dependencies are installed
  3. apt:
  4. name:
  5. - apt-transport-https
  6. - ca-certificates
  7. state: present
  8. update_cache: yes
  9. - name: Ensure Docker's APT key is trusted
  10. apt_key:
  11. url: https://download.docker.com/linux/ubuntu/gpg
  12. id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
  13. state: present
  14. register: add_repository_key
  15. ignore_errors: true
  16. when: matrix_docker_installation_enabled|bool and matrix_docker_package_name == 'docker-ce'
  17. - name: Ensure Docker repository is enabled
  18. apt_repository:
  19. repo: "deb [arch=amd64] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable"
  20. state: present
  21. update_cache: yes
  22. when: matrix_docker_installation_enabled|bool and matrix_docker_package_name == 'docker-ce'
  23. - name: Ensure APT packages are installed
  24. apt:
  25. name:
  26. - "python{{'3' if ansible_python.version.major == 3 else ''}}-docker"
  27. - ntp
  28. - fuse
  29. state: latest
  30. update_cache: yes
  31. - name: Ensure Docker is installed
  32. apt:
  33. name:
  34. - "{{ matrix_docker_package_name }}"
  35. state: latest
  36. when: matrix_docker_installation_enabled|bool