Skip to content

Commit

Permalink
Replacing edpm_chrony with linux-systemroles.timesync
Browse files Browse the repository at this point in the history
Signed-off-by: Jiri Podivin <[email protected]>
  • Loading branch information
jpodivin committed Oct 9, 2023
1 parent 7756f5a commit 55f9940
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 28 deletions.
6 changes: 0 additions & 6 deletions playbooks/configure_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
40 changes: 36 additions & 4 deletions playbooks/install_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
18 changes: 0 additions & 18 deletions playbooks/run_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ collections:
- community.general
- containers.podman
- fedora.linux_system_roles
roles:
- name: linux-system-roles.timesync

0 comments on commit 55f9940

Please sign in to comment.