Matrix Docker Ansible eploy
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.
 
 

44 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. 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. - bash-completion
  27. - python-docker
  28. - ntp
  29. - fuse
  30. state: latest
  31. update_cache: yes
  32. - name: Ensure Docker is installed
  33. apt:
  34. name:
  35. - "{{ matrix_docker_package_name }}"
  36. state: latest
  37. update_cache: yes
  38. when: matrix_docker_installation_enabled|bool