Update ansible code
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Adrien Reslinger 2022-08-16 16:17:38 +02:00
parent 4c799f56b2
commit 5649568173
Signed by: adrien
GPG key ID: DA7B27055C66D6DE
5 changed files with 26 additions and 24 deletions

View file

@ -1,13 +1,13 @@
---
#chrony_ntpservers:
# - 0.centos.pool.ntp.org
# - 1.centos.pool.ntp.org
# - 2.centos.pool.ntp.org
# - 3.centos.pool.ntp.org
# chrony_ntpservers:
# - 0.centos.pool.ntp.org
# - 1.centos.pool.ntp.org
# - 2.centos.pool.ntp.org
# - 3.centos.pool.ntp.org
chrony_ntppools:
- 1.pool.ntp.org
- 2.pool.ntp.org
- 3.pool.ntp.org
chrony_allowclients: false
#chrony_clients:
# - 192.168.0.0/24
# chrony_clients:
# - 192.168.0.0/24

View file

@ -1,4 +1,5 @@
---
- name: Restart chronyd
service: name="chronyd" state=restarted
ansible.builtin.service:
name: "chronyd"
state: restarted

View file

@ -6,11 +6,13 @@ galaxy_info:
galaxy_tags: []
license: GPL2
platforms:
- name: CentOS
version:
- 7
- 8
- name: RedHat
version:
- 7
- 8
- name: CentOS
version:
- 7
- 8
- 9
- name: RedHat
version:
- 7
- 8
- 9

View file

@ -3,14 +3,14 @@
include_vars: "{{ ansible_os_family }}.yml"
- name: Install chrony packages
package:
ansible.builtin.package:
name: "{{ chrony_packages_name }}"
state: present
update_cache: yes
update_cache: true
notify: Restart chronyd
- name: Deploy chronyd configuration
template:
ansible.builtin.template:
src: chrony.conf.j2
dest: /etc/chrony.conf
owner: root
@ -19,12 +19,12 @@
notify: Restart chronyd
- name: Enable chronyd on boot
service:
ansible.builtin.service:
name: chronyd
enabled: yes
enabled: true
- name: Open Firewalld
firewalld:
ansible.posix.firewalld:
service: ntp
permanent: true
state: enabled

View file

@ -1,4 +1,3 @@
---
chrony_packages_name:
- chrony