Compare commits

..

10 Commits

Author SHA1 Message Date
13bc52079c 0.1.51-DEV-20221007-1
---------------------
  * ADD:
    - support for centos 9 added
2022-10-07 14:20:28 -04:00
8a32e185f3 0.1.5-DEV-20210317-161644
-------------------------
* FIX:
      - meta/main.yml:1: [E701] Role info should contain platforms
      - meta/main.yml:1: [E703] Should change default metadata: author
      - meta/main.yml:1: [E703] Should change default metadata: company
      - meta/main.yml:1: [E703] Should change default metadata: license
2021-03-17 16:16:51 -04:00
335b9d6c94 0.1.5-DEV-20210317-161410
-------------------------
    * MODIFY:
      - ntp_lan_server default changed
2021-03-17 16:14:44 -04:00
92c708e486 0.1.4-DEV-20210219-023356
-------------------------
    * FIX:
      - fixed default ntp server
2021-02-19 02:34:01 -05:00
c80a55fe7d 0.1.3-DEV-20210219-022129
-------------------------
    * ADD:
      - add support for centos 8

    * MODIFY:
      - update .gitlab-ci.yml so jobs will run on the correct ci host
2021-02-19 02:22:32 -05:00
735fb9eb92 0.1.2-DEV-20201009-043714
-------------------------
    * MODIFY:
      - changed default ntp server for the lan
      - updated ntp_conf.j2 template to include the iburst option
2020-10-09 04:38:16 -04:00
4b842d6fce 0.1.1-DEV-20200430-003350
--------------------------
    * ADD:
      - add exceptions for service name if dist == Debian
2020-04-30 00:34:02 -04:00
ca675d8829 0.1.0-DEV-20200429-234633
-------------------------
    * ADD:
      - add additional tests for CI
2020-04-29 23:46:36 -04:00
ce618f3b68 0.1.0-DEV-20200429-234422
-------------------------
    * FIX:
      - fix runner tag
2020-04-29 23:44:14 -04:00
ef5e9b6c23 0.1.0-DEV-20200429-234203
-------------------------
    * INITIAL:
      - initial commit for zen_ntp ansible role; development branch
2020-04-29 23:42:07 -04:00
6 changed files with 30 additions and 9 deletions

View File

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

View File

@ -64,6 +64,9 @@ 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,10 +1,11 @@
---
# defaults file for zen_ntp
ntp_conf_file : "/etc/ntp.conf"
ntp_conf_version : "1.0"
ntp_conf_revision : "20200429-232122"
ntp_conf_revision : "20201009-043644"
ntp_service: ntpd
ntp_node_type : server
@ -13,6 +14,7 @@
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 : ntpd
name : "{{ ntp_service }}"
state: restarted
when: ansible_virtualization_type != "docker"

View File

@ -1,9 +1,23 @@
---
# 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
name : "{{ ntp_pkg | default('ntp') }}"
state : present
@ -17,9 +31,9 @@
notify: restart ntpd
- name: enable/start ntpd
- name: enable/start ntpd or chrony
service:
name: ntpd
name: "{{ ntp_service }}"
enabled: yes
state: started
when: ansible_distribution_major_version == "7" and ansible_virtualization_type != "docker"
when: 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 }}
server {{ ntp_lan_server }} iburst
{% endif %}
includefile /etc/ntp/crypto/pw