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

48 строки
1.8 KiB

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