Compare commits
No commits in common. "13bc52079c796c9c62feb17c45d7e655caa00e41" and "ea2a253234dbfd8b3a0f5e459526f51bda80c0fa" have entirely different histories.
13bc52079c
...
ea2a253234
@ -5,7 +5,5 @@ skip_list:
|
|||||||
- '201'
|
- '201'
|
||||||
- '305'
|
- '305'
|
||||||
- '403'
|
- '403'
|
||||||
- '701'
|
|
||||||
- '703'
|
|
||||||
use_default_rules: true
|
use_default_rules: true
|
||||||
verbosity: 1
|
verbosity: 1
|
||||||
|
@ -64,9 +64,6 @@ stages:
|
|||||||
script:
|
script:
|
||||||
- cp -av ${ANSIBLE_ROLE_PATH} /etc/ansible/roles/${ANSIBLE_ROLE}
|
- cp -av ${ANSIBLE_ROLE_PATH} /etc/ansible/roles/${ANSIBLE_ROLE}
|
||||||
- ansible-playbook -v --connection=local ${ANSIBLE_EXTRA_VARS} tests/test.yml
|
- 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 ###
|
### END TEMPLATES ###
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
---
|
---
|
||||||
# defaults file for zen_ntp
|
# defaults file for zen_ntp
|
||||||
|
|
||||||
|
|
||||||
ntp_conf_file : "/etc/ntp.conf"
|
ntp_conf_file : "/etc/ntp.conf"
|
||||||
ntp_conf_version : "1.0"
|
ntp_conf_version : "1.0"
|
||||||
ntp_conf_revision : "20201009-043644"
|
ntp_conf_revision : "20200429-232122"
|
||||||
|
|
||||||
|
|
||||||
ntp_service: ntpd
|
|
||||||
|
|
||||||
|
|
||||||
ntp_node_type : server
|
ntp_node_type : server
|
||||||
@ -14,7 +13,6 @@
|
|||||||
ntp_network : 10.0.0.0
|
ntp_network : 10.0.0.0
|
||||||
ntp_netmask : 255.0.0.0
|
ntp_netmask : 255.0.0.0
|
||||||
|
|
||||||
|
|
||||||
ntp_lan_server : 10.10.10.55
|
ntp_lan_server : 10.10.10.55
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
# handlers file for zen_ntp
|
# handlers file for zen_ntp
|
||||||
- name: restart ntpd
|
- name: restart ntpd
|
||||||
service:
|
service:
|
||||||
name : "{{ ntp_service }}"
|
name : ntpd
|
||||||
state: restarted
|
state: restarted
|
||||||
when: ansible_virtualization_type != "docker"
|
when: ansible_virtualization_type != "docker"
|
||||||
|
@ -1,23 +1,9 @@
|
|||||||
---
|
---
|
||||||
# tasks file for zen_ntp
|
# 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
|
- name: install ntp if not present
|
||||||
package:
|
package:
|
||||||
name : "{{ ntp_pkg | default('ntp') }}"
|
name : ntp
|
||||||
state : present
|
state : present
|
||||||
|
|
||||||
|
|
||||||
@ -31,9 +17,9 @@
|
|||||||
notify: restart ntpd
|
notify: restart ntpd
|
||||||
|
|
||||||
|
|
||||||
- name: enable/start ntpd or chrony
|
- name: enable/start ntpd
|
||||||
service:
|
service:
|
||||||
name: "{{ ntp_service }}"
|
name: ntpd
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
when: ansible_virtualization_type != "docker"
|
when: ansible_distribution_major_version == "7" and ansible_virtualization_type != "docker"
|
||||||
|
@ -19,7 +19,7 @@ restrict {{ ntp_network }} mask {{ ntp_netmask }} nomodify notrap
|
|||||||
server {{ server }}
|
server {{ server }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
server {{ ntp_lan_server }} iburst
|
server {{ ntp_lan_server }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
includefile /etc/ntp/crypto/pw
|
includefile /etc/ntp/crypto/pw
|
||||||
|
Loading…
x
Reference in New Issue
Block a user