Compare commits

..

No commits in common. "13bc52079c796c9c62feb17c45d7e655caa00e41" and "ea2a253234dbfd8b3a0f5e459526f51bda80c0fa" have entirely different histories.

6 changed files with 9 additions and 30 deletions

View File

@ -5,7 +5,5 @@ skip_list:
- '201'
- '305'
- '403'
- '701'
- '703'
use_default_rules: true
verbosity: 1

View File

@ -64,9 +64,6 @@ stages:
script:
- cp -av ${ANSIBLE_ROLE_PATH} /etc/ansible/roles/${ANSIBLE_ROLE}
- ansible-playbook -v --connection=local ${ANSIBLE_EXTRA_VARS} tests/test.yml
- cat /etc/ntp.conf
- ansible-playbook -v --connection=local ${ANSIBLE_EXTRA_VARS} tests/test.yml -e ntp_node_type=client
- cat /etc/ntp.conf
### END TEMPLATES ###

View File

@ -1,11 +1,10 @@
---
# defaults file for zen_ntp
ntp_conf_file : "/etc/ntp.conf"
ntp_conf_version : "1.0"
ntp_conf_revision : "20201009-043644"
ntp_service: ntpd
ntp_conf_revision : "20200429-232122"
ntp_node_type : server
@ -14,7 +13,6 @@
ntp_network : 10.0.0.0
ntp_netmask : 255.0.0.0
ntp_lan_server : 10.10.10.55

View File

@ -2,6 +2,6 @@
# handlers file for zen_ntp
- name: restart ntpd
service:
name : "{{ ntp_service }}"
name : ntpd
state: restarted
when: ansible_virtualization_type != "docker"

View File

@ -1,23 +1,9 @@
---
# tasks file for zen_ntp
- name: set service name for debian if required
set_fact:
ntp_service: ntp
when: ansible_distribution == "Debian"
- name: set package and service for centos 8/9
set_fact:
ntp_pkg : chrony
ntp_service : chronyd
when:
- (ansible_distribution_major_version == "8" or
ansible_distribution_major_version == "9")
- name: install ntp if not present
package:
name : "{{ ntp_pkg | default('ntp') }}"
name : ntp
state : present
@ -31,9 +17,9 @@
notify: restart ntpd
- name: enable/start ntpd or chrony
- name: enable/start ntpd
service:
name: "{{ ntp_service }}"
name: ntpd
enabled: yes
state: started
when: ansible_virtualization_type != "docker"
when: ansible_distribution_major_version == "7" and ansible_virtualization_type != "docker"

View File

@ -19,7 +19,7 @@ restrict {{ ntp_network }} mask {{ ntp_netmask }} nomodify notrap
server {{ server }}
{% endfor %}
{% else %}
server {{ ntp_lan_server }} iburst
server {{ ntp_lan_server }}
{% endif %}
includefile /etc/ntp/crypto/pw