Update ansible code
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
4c799f56b2
commit
5649568173
5 changed files with 26 additions and 24 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
- name: Restart chronyd
|
||||
service: name="chronyd" state=restarted
|
||||
|
||||
ansible.builtin.service:
|
||||
name: "chronyd"
|
||||
state: restarted
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
---
|
||||
chrony_packages_name:
|
||||
- chrony
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue