Skip to content

Commit

Permalink
Merge pull request #373 from jpodivin/timesync
Browse files Browse the repository at this point in the history
Replacing edpm_chrony with linux-systemroles.timesync
  • Loading branch information
openshift-merge-bot[bot] authored Nov 9, 2023
2 parents ebe1621 + 90e952a commit f1b8046
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 18 deletions.
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Contents:
usage
roles
plugins
playbooks

Indices and tables
==================
Expand Down
9 changes: 9 additions & 0 deletions docs/source/playbooks.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Playbooks in EDPM-Ansible
=========================

Contents:

.. toctree::
:glob:

playbooks/*
19 changes: 19 additions & 0 deletions docs/source/playbooks/install_os.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
=====================
Playbook - install_os
=====================

Installs services necessary for the EDPM operation.
Uses external `timesync` role from `system roles collection`_ to both install and configure chrony.

--------------------------
Time service configuration
--------------------------

Variables of the `timesync`_ system role can be overriden in a standard ansible way,
while respecting resolution order. Default values are set in the `install_os` playbook,
while allowing for override.

All variables of the timesync role can used while using this playbook.

.. _`system roles collection`: https://linux-system-roles.github.io/
.. _`timesync`: https://github.com/linux-system-roles/timesync
1 change: 1 addition & 0 deletions playbooks/configure_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
tags:
- edpm_sshd
- name: Configure edpm_chrony
when: timesync_ntp_servers is not defined
ansible.builtin.import_role:
name: osp.edpm.edpm_chrony
tasks_from: config.yml
Expand Down
17 changes: 17 additions & 0 deletions playbooks/install_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,29 @@
tasks_from: install.yml
tags:
- edpm_sshd
- name: Set up time services
when: timesync_ntp_servers is defined
block:
- name: Set FQCN for the timesync role
ansible.builtin.set_fact:
timesyncfqcn:
"{%- if ansible_facts['distribution'] == 'RedHat' -%}
redhat.rhel{%- else -%}
fedora.linux{%- endif -%}
_system_roles.timesync"
delegate_to: localhost
- name: Install and configure time service using timesync system role
ansible.builtin.include_role:
name: "{{timesyncfqcn}}"
tags:
- dataplane_chrony
- name: Install edpm_chrony
ansible.builtin.import_role:
name: osp.edpm.edpm_chrony
tasks_from: install.yml
tags:
- edpm_chrony
when: timesync_ntp_servers is not defined
- name: Install edpm_logrotate_crond
ansible.builtin.import_role:
name: osp.edpm.edpm_logrotate_crond
Expand Down
39 changes: 21 additions & 18 deletions playbooks/run_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,27 @@
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_chrony role
when: timesync_ntp_servers is not defined
block:
- 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

0 comments on commit f1b8046

Please sign in to comment.