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

47 строки
1.6 KiB

  1. ---
  2. - include_tasks: "{{ role_path }}/tasks/server_base/setup_redhat.yml"
  3. when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int < 8
  4. - include_tasks: "{{ role_path }}/tasks/server_base/setup_redhat8.yml"
  5. when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int > 7 and ansible_distribution_major_version|int < 30
  6. - include_tasks: "{{ role_path }}/tasks/server_base/setup_fedora.yml"
  7. when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int > 30
  8. - block:
  9. # ansible_lsb is only available if lsb-release is installed.
  10. - name: Ensure lsb-release installed
  11. apt:
  12. name:
  13. - lsb-release
  14. state: present
  15. update_cache: true
  16. register: lsb_release_installation_result
  17. - name: Reread ansible_lsb facts if lsb-release got installed
  18. setup: filter=ansible_lsb*
  19. when: lsb_release_installation_result.changed
  20. - include_tasks: "{{ role_path }}/tasks/server_base/setup_debian.yml"
  21. when: (ansible_os_family == 'Debian') and (ansible_lsb.id != 'Raspbian')
  22. - include_tasks: "{{ role_path }}/tasks/server_base/setup_raspbian.yml"
  23. when: (ansible_os_family == 'Debian') and (ansible_lsb.id == 'Raspbian')
  24. when: ansible_os_family == 'Debian'
  25. - include_tasks: "{{ role_path }}/tasks/server_base/setup_archlinux.yml"
  26. when: ansible_distribution == 'Archlinux'
  27. - name: Ensure Docker is started and autoruns
  28. service:
  29. name: docker
  30. state: started
  31. enabled: true
  32. - name: "Ensure {{ matrix_ntpd_service }} is started and autoruns"
  33. service:
  34. name: "{{ matrix_ntpd_service }}"
  35. state: started
  36. enabled: true