diff --git a/playbooks/configure_os.yml b/playbooks/configure_os.yml index f79818fd1..316662e3a 100644 --- a/playbooks/configure_os.yml +++ b/playbooks/configure_os.yml @@ -29,12 +29,6 @@ tasks_from: configure.yml tags: - edpm_sshd - - name: Configure edpm_chrony - ansible.builtin.import_role: - name: osp.edpm.edpm_chrony - tasks_from: config.yml - tags: - - edpm_chrony - name: Configure edpm_timezone ansible.builtin.import_role: name: osp.edpm.edpm_timezone diff --git a/playbooks/install_os.yml b/playbooks/install_os.yml index 2bc93c636..260859cd8 100644 --- a/playbooks/install_os.yml +++ b/playbooks/install_os.yml @@ -4,6 +4,20 @@ hosts: all strategy: linear become: true + vars: + edpm_chrony_makestep: "1.0 3" + edpm_chrony_driftfile: "/var/lib/chrony/drift" + edmp_chrony_bindcmdaddresses: + - "127.0.0.1" + - "::1" + edpm_chrony_logdir: + - "/var/log/chrony" + edpm_chrony_custom_settings: + - "logdir {{ edpm_chrony_logdir }}" + - "driftfile {{ edpm_chrony_driftfile }}" + - "deny all" + - "rtcsync" + - "makestep {{ edpm_chrony_makestep }}" tasks: - name: Install edpm_podman ansible.builtin.import_role: @@ -17,10 +31,28 @@ tasks_from: install.yml tags: - edpm_sshd - - name: Install edpm_chrony - ansible.builtin.import_role: - name: osp.edpm.edpm_chrony - tasks_from: install.yml + - name: Install and configure edpm_chrony + block: + - name: Compile bindcmdaddress list + ansible.builtin.set_fact: + edmp_chrony_bindcmdaddresses: "{{ edmp_chrony_bindcmdaddresses | map('regex_replace', '^(.*)$', 'bindcmdaddress\\1') | list }}" + - ansible.builtin.import_role: + name: linux_system_roles.timesync + vars: + timesync_ntp_servers: + - hostname: '0.pool.ntp.org' + max_poll: 10 + min_poll: 6 + - hostname: '1.pool.ntp.org' + max_poll: 10 + min_poll: 6 + - hostname: '2.pool.ntp.org' + max_poll: 10 + min_poll: 6 + - hostname: '3.pool.ntp.org' + max_poll: 10 + min_poll: 6 + timesync_chrony_custom_settings: "{{ edpm_chrony_custom_settings + edmp_chrony_bindcmdaddresses }}" tags: - edpm_chrony - name: Install edpm_logrotate_crond diff --git a/playbooks/run_os.yml b/playbooks/run_os.yml index f8c8bdb77..5f1973efd 100644 --- a/playbooks/run_os.yml +++ b/playbooks/run_os.yml @@ -11,24 +11,6 @@ tasks_from: run.yml tags: - edpm_sshd - - name: Run edpm_chrony - ansible.builtin.import_role: - name: osp.edpm.edpm_chrony - tasks_from: run.yml - tags: - - edpm_chrony - - name: Run edpm_chrony (Online) - ansible.builtin.import_role: - name: osp.edpm.edpm_chrony - tasks_from: online.yml - tags: - - edpm_chrony - - name: Run edpm_chrony (Sync) - ansible.builtin.import_role: - name: osp.edpm.edpm_chrony - tasks_from: sync.yml - tags: - - edpm_chrony - name: Run edpm_timezone ansible.builtin.import_role: name: osp.edpm.edpm_timezone diff --git a/requirements.yml b/requirements.yml index 1be003745..98b2e4dfa 100644 --- a/requirements.yml +++ b/requirements.yml @@ -19,3 +19,5 @@ collections: - community.general - containers.podman - fedora.linux_system_roles +roles: + - name: linux-system-roles.timesync