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: # chrony_ntpservers:
# - 0.centos.pool.ntp.org # - 0.centos.pool.ntp.org
# - 1.centos.pool.ntp.org # - 1.centos.pool.ntp.org
# - 2.centos.pool.ntp.org # - 2.centos.pool.ntp.org
# - 3.centos.pool.ntp.org # - 3.centos.pool.ntp.org
chrony_ntppools: chrony_ntppools:
- 1.pool.ntp.org - 1.pool.ntp.org
- 2.pool.ntp.org - 2.pool.ntp.org
- 3.pool.ntp.org - 3.pool.ntp.org
chrony_allowclients: false chrony_allowclients: false
#chrony_clients: # chrony_clients:
# - 192.168.0.0/24 # - 192.168.0.0/24

View file

@ -1,4 +1,5 @@
--- ---
- name: Restart chronyd - 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: [] galaxy_tags: []
license: GPL2 license: GPL2
platforms: platforms:
- name: CentOS - name: CentOS
version: version:
- 7 - 7
- 8 - 8
- name: RedHat - 9
version: - name: RedHat
- 7 version:
- 8 - 7
- 8
- 9

View file

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

View file

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