mirror of
https://github.com/rocky-linux/infrastructure
synced 2024-11-29 08:26:28 +00:00
fixing issue #582
This commit is contained in:
parent
e9106cdb69
commit
353d4bb0cf
@ -1,3 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
chrony_timeservers = ["chrony001.rockylinux.com", "chrony002.rockylinux.com"]
|
|
@ -23,8 +23,6 @@ build-a-box ansible_host=10.100.1.112
|
|||||||
idp001 ansible_host=10.100.x.x
|
idp001 ansible_host=10.100.x.x
|
||||||
|
|
||||||
[chronyservers]
|
[chronyservers]
|
||||||
chronyd001 ansiblehost=10.100.3.110
|
chrony001 ansiblehost=10.100.3.110
|
||||||
chronyd002 ansiblehost=10.200.3.111
|
chrony002 ansiblehost=10.200.3.111
|
||||||
|
|
||||||
[chronyclients]
|
|
||||||
build-abox asnsiblehost=10.100.x.x
|
|
||||||
|
@ -2,10 +2,38 @@
|
|||||||
# Sets Up Chrony Server/Client
|
# Sets Up Chrony Server/Client
|
||||||
# Created: @derekmpage
|
# Created: @derekmpage
|
||||||
# Kudos: @danielkubat @Darkbat91
|
# Kudos: @danielkubat @Darkbat91
|
||||||
|
# Fixes: @nazunalika
|
||||||
- name: Rocky Chrony Runbook
|
- name: Rocky Chrony Runbook
|
||||||
hosts: all
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
|
vars_files:
|
||||||
|
- vars/chrony.yml
|
||||||
|
|
||||||
|
# This is to try to avoid the handler issue in pre/post tasks
|
||||||
|
handlers:
|
||||||
|
- import_tasks: handlers/main.yml
|
||||||
|
|
||||||
|
pre_tasks:
|
||||||
|
- name: Check if ansible cannot be run here
|
||||||
|
stat:
|
||||||
|
path: /etc/no-ansible
|
||||||
|
register: no_ansible
|
||||||
|
|
||||||
|
- name: Verify if we can run ansible
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- "not no_ansible.stat.exists"
|
||||||
|
msg: "/etc/no-ansible exists - skipping run on this node"
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Configure Chrony
|
- name: Configure Chrony
|
||||||
import_tasks: tasks/chrony.yml
|
import_tasks: tasks/chrony.yml
|
||||||
|
|
||||||
|
post_tasks:
|
||||||
|
- name: Touching run file that ansible has ran here
|
||||||
|
file:
|
||||||
|
path: /var/log/ansible.run
|
||||||
|
state: touch
|
||||||
|
mode: '0644'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
---
|
---
|
||||||
|
- name: Create overrides if we're an IPA Replica
|
||||||
|
include_vars: "{{ item }}"
|
||||||
|
with_first_found:
|
||||||
|
- "chronyserver.yml"
|
||||||
|
when: "'chronyservers' in group_names"
|
||||||
|
|
||||||
- name: Install chrony packages
|
- name: Install chrony packages
|
||||||
yum:
|
yum:
|
||||||
name: "{{ chrony_packages }}"
|
name: "{{ chrony_packages }}"
|
||||||
|
@ -160,5 +160,3 @@ enable_svc:
|
|||||||
syslog_packages:
|
syslog_packages:
|
||||||
- rsyslog
|
- rsyslog
|
||||||
|
|
||||||
ntp_packages:
|
|
||||||
- chrony
|
|
||||||
|
@ -26,9 +26,8 @@ chrony_service_enabled: yes
|
|||||||
|
|
||||||
# default internet timeservers to use
|
# default internet timeservers to use
|
||||||
chrony_timeservers:
|
chrony_timeservers:
|
||||||
- 0.pool.ntp.org
|
- chrony001.rockylinux.com
|
||||||
- 1.pool.ntp.org
|
- chrony002.rockylinux.com
|
||||||
- 2.pool.ntp.org
|
|
||||||
|
|
||||||
# is chrony ntp server - allows client connections
|
# is chrony ntp server - allows client connections
|
||||||
chrony_server: false
|
chrony_server: false
|
||||||
|
9
ansible/playbooks/vars/chronyserver.yml
Normal file
9
ansible/playbooks/vars/chronyserver.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
# default internet timeservers to use
|
||||||
|
chrony_timeservers:
|
||||||
|
- chrony001.rockylinux.com
|
||||||
|
- chrony002.rockylinux.com
|
||||||
|
|
||||||
|
# is chrony ntp server - allows client connections
|
||||||
|
chrony_server: true
|
Loading…
Reference in New Issue
Block a user