Matrix Docker Ansible eploy
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

43 lines
1.2 KiB

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