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

47 строки
1.7 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: filter=ansible_lsb*
  20. when: lsb_release_installation_result.changed
  21. - ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_debian.yml"
  22. when: (ansible_os_family == 'Debian') and (ansible_lsb.id != 'Raspbian')
  23. - ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_raspbian.yml"
  24. when: (ansible_os_family == 'Debian') and (ansible_lsb.id == 'Raspbian')
  25. - ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_archlinux.yml"
  26. when: ansible_distribution == 'Archlinux'
  27. - name: Ensure Docker is started and autoruns
  28. ansible.builtin.service:
  29. name: docker
  30. state: started
  31. enabled: true
  32. - name: "Ensure ntpd is started and autoruns"
  33. ansible.builtin.service:
  34. name: "{{ matrix_ntpd_service }}"
  35. state: started
  36. enabled: true