Ver a proveniência

Install ntpd/systemd-timesync via com.devture.ansible.role.timesync

pull/2201/head^2
Slavi Pantaleev há 3 anos
ascendente
cometimento
04c6c11561
11 ficheiros alterados com 26 adições e 44 eliminações
  1. +15
    -0
      group_vars/matrix_servers
  2. +3
    -0
      requirements.yml
  3. +0
    -3
      roles/custom/matrix-base/defaults/main.yml
  4. +0
    -6
      roles/custom/matrix-base/tasks/server_base/setup.yml
  5. +0
    -7
      roles/custom/matrix-base/tasks/server_base/setup_debian.yml
  6. +0
    -7
      roles/custom/matrix-base/tasks/server_base/setup_fedora.yml
  7. +0
    -7
      roles/custom/matrix-base/tasks/server_base/setup_raspbian.yml
  8. +0
    -7
      roles/custom/matrix-base/tasks/server_base/setup_redhat.yml
  9. +0
    -7
      roles/custom/matrix-base/tasks/server_base/setup_redhat8.yml
  10. +2
    -0
      roles/custom/matrix_playbook_migration/tasks/validate_config.yml
  11. +6
    -0
      setup.yml

+ 15
- 0
group_vars/matrix_servers Ver ficheiro

@@ -10,6 +10,21 @@
# by re-defining it in your own configuration file (`inventory/host_vars/matrix.<your-domain>`). # by re-defining it in your own configuration file (`inventory/host_vars/matrix.<your-domain>`).




########################################################################
# #
# com.devture.ansible.role.timesync #
# #
########################################################################

# To completely disable installing systemd-timesyncd/ntpd, use `devture_timesync_installation_enabled: false`.

########################################################################
# #
# /com.devture.ansible.role.timesync #
# #
########################################################################




###################################################################### ######################################################################
# #


+ 3
- 0
requirements.yml Ver ficheiro

@@ -6,6 +6,9 @@
- src: git+https://github.com/devture/com.devture.ansible.role.systemd_docker_base.git - src: git+https://github.com/devture/com.devture.ansible.role.systemd_docker_base.git
version: 327d2e17f5189ac2480d6012f58cf64a2b46efba version: 327d2e17f5189ac2480d6012f58cf64a2b46efba


- src: git+https://github.com/devture/com.devture.ansible.role.timesync.git
version: 461ace97fcf0e36c76747b36fcad8587d9b072f5

- src: git+https://github.com/devture/com.devture.ansible.role.playbook_state_preserver.git - src: git+https://github.com/devture/com.devture.ansible.role.playbook_state_preserver.git
version: 0857450721d525238ca230c9e6f8f8ad3a248564 version: 0857450721d525238ca230c9e6f8f8ad3a248564




+ 0
- 3
roles/custom/matrix-base/defaults/main.yml Ver ficheiro

@@ -134,9 +134,6 @@ matrix_host_command_openssl: "/usr/bin/env openssl"
matrix_host_command_systemctl: "/usr/bin/env systemctl" matrix_host_command_systemctl: "/usr/bin/env systemctl"
matrix_host_command_sh: "/usr/bin/env sh" matrix_host_command_sh: "/usr/bin/env sh"


matrix_ntpd_package: "{{ 'systemd-timesyncd' if (ansible_os_family == 'RedHat' and ansible_distribution_major_version | int > 7) or (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version | int > 18) else ('systemd' if ansible_os_family == 'Suse' else 'ntp') }}"
matrix_ntpd_service: "{{ 'systemd-timesyncd' if (ansible_os_family == 'RedHat' and ansible_distribution_major_version | int > 7) or (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version | int > 18) or ansible_distribution == 'Archlinux' or ansible_os_family == 'Suse' else ('ntpd' if ansible_os_family == 'RedHat' else 'ntp') }}"

matrix_homeserver_url: "https://{{ matrix_server_fqn_matrix }}" matrix_homeserver_url: "https://{{ matrix_server_fqn_matrix }}"


# Specifies where the homeserver's Client-Server API is on the container network. # Specifies where the homeserver's Client-Server API is on the container network.


+ 0
- 6
roles/custom/matrix-base/tasks/server_base/setup.yml Ver ficheiro

@@ -39,9 +39,3 @@
name: docker name: docker
state: started state: started
enabled: true enabled: true

- name: "Ensure ntpd is started and autoruns"
ansible.builtin.service:
name: "{{ matrix_ntpd_service }}"
state: started
enabled: true

+ 0
- 7
roles/custom/matrix-base/tasks/server_base/setup_debian.yml Ver ficheiro

@@ -25,13 +25,6 @@
update_cache: true update_cache: true
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'


- name: Ensure APT packages are installed
ansible.builtin.apt:
name:
- "{{ matrix_ntpd_package }}"
state: present
update_cache: true

- name: Ensure Docker is installed - name: Ensure Docker is installed
ansible.builtin.apt: ansible.builtin.apt:
name: name:


+ 0
- 7
roles/custom/matrix-base/tasks/server_base/setup_fedora.yml Ver ficheiro

@@ -17,13 +17,6 @@
key: https://download.docker.com/linux/fedora/gpg key: https://download.docker.com/linux/fedora/gpg
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'


- name: Ensure yum packages are installed
ansible.builtin.yum:
name:
- "{{ matrix_ntpd_package }}"
state: present
update_cache: true

- name: Ensure Docker is installed - name: Ensure Docker is installed
ansible.builtin.yum: ansible.builtin.yum:
name: name:


+ 0
- 7
roles/custom/matrix-base/tasks/server_base/setup_raspbian.yml Ver ficheiro

@@ -25,13 +25,6 @@
update_cache: true update_cache: true
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'


- name: Ensure APT packages are installed
ansible.builtin.apt:
name:
- "{{ matrix_ntpd_package }}"
state: present
update_cache: true

- name: Ensure Docker is installed - name: Ensure Docker is installed
ansible.builtin.apt: ansible.builtin.apt:
name: name:


+ 0
- 7
roles/custom/matrix-base/tasks/server_base/setup_redhat.yml Ver ficheiro

@@ -15,13 +15,6 @@
key: https://download.docker.com/linux/centos/gpg key: https://download.docker.com/linux/centos/gpg
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'


- name: Ensure yum packages are installed
ansible.builtin.yum:
name:
- "{{ matrix_ntpd_package }}"
state: present
update_cache: true

- name: Ensure Docker is installed - name: Ensure Docker is installed
ansible.builtin.yum: ansible.builtin.yum:
name: name:


+ 0
- 7
roles/custom/matrix-base/tasks/server_base/setup_redhat8.yml Ver ficheiro

@@ -22,13 +22,6 @@
state: present state: present
update_cache: true update_cache: true


- name: Ensure yum packages are installed
ansible.builtin.yum:
name:
- "{{ matrix_ntpd_package }}"
state: present
update_cache: true

- name: Ensure Docker is installed - name: Ensure Docker is installed
ansible.builtin.yum: ansible.builtin.yum:
name: name:


+ 2
- 0
roles/custom/matrix_playbook_migration/tasks/validate_config.yml Ver ficheiro

@@ -10,3 +10,5 @@
- {'old': 'matrix_vars_yml_snapshotting_enabled', 'new': 'devture_playbook_state_preserver_vars_preservation_enabled'} - {'old': 'matrix_vars_yml_snapshotting_enabled', 'new': 'devture_playbook_state_preserver_vars_preservation_enabled'}
- {'old': 'matrix_vars_yml_snapshotting_src', 'new': 'devture_playbook_state_preserver_vars_preservation_src'} - {'old': 'matrix_vars_yml_snapshotting_src', 'new': 'devture_playbook_state_preserver_vars_preservation_src'}
- {'old': 'matrix_playbook_commit_hash_preservation_enabled', 'new': 'devture_playbook_state_preserver_commit_hash_preservation_enabled'} - {'old': 'matrix_playbook_commit_hash_preservation_enabled', 'new': 'devture_playbook_state_preserver_commit_hash_preservation_enabled'}
- {'old': 'matrix_ntpd_package', 'new': 'devture_timesync_ntpd_package'}
- {'old': 'matrix_ntpd_service', 'new': 'devture_timesync_ntpd_service'}

+ 6
- 0
setup.yml Ver ficheiro

@@ -15,6 +15,12 @@


- role: custom/matrix_playbook_migration - role: custom/matrix_playbook_migration


- when: devture_timesync_installation_enabled | bool
role: galaxy/com.devture.ansible.role.timesync
tags:
- setup-timesync
- setup-all

- custom/matrix-base - custom/matrix-base
- custom/matrix-dynamic-dns - custom/matrix-dynamic-dns
- custom/matrix-mailer - custom/matrix-mailer


Carregando…
Cancelar
Guardar