Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing edpm_chrony with linux-systemroles.timesync #373

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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