diff --git a/.github/galaxy.svg b/.github/galaxy.svg
new file mode 100644
index 0000000..7bd7e3c
--- /dev/null
+++ b/.github/galaxy.svg
@@ -0,0 +1,79 @@
+
diff --git a/.github/license.svg b/.github/license.svg
new file mode 100644
index 0000000..67cfb13
--- /dev/null
+++ b/.github/license.svg
@@ -0,0 +1,84 @@
+
diff --git a/LICENSE b/LICENSE
index 51b55b9..598731c 100644
--- a/LICENSE
+++ b/LICENSE
@@ -187,7 +187,7 @@
identification within third-party archives.
Copyright 2019 L3D
- Copyright 2018 diodonfrost
+ Copyright 2018 diodonfrost
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/README.md b/README.md
index 5446a16..21cdd7b 100644
--- a/README.md
+++ b/README.md
@@ -1,22 +1,15 @@
- Ansible role: ntp
+[![Ansible Galaxy](https://raw.githubusercontent.com/roles-ansible/ansible_role_ntp/main/.github/galaxy.svg?sanitize=true)](https://galaxy.ansible.com/do1jlr/ntp) [![MIT License](https://raw.githubusercontent.com/roles-ansible/ansible_role_ntp/main/.github/license.svg?sanitize=true)](https://github.com/roles-ansible/ansible_role_ntp/blob/main/LICENSE)
+
+ Ansible role ntp
======================
-This role provide a compliance for install ntp on your target host.
-
-## Requirements
-
-This role was developed using Ansible 2.7 Backwards compatibility is not guaranteed.
-
-```
-Please have a look into the meta file for supportet platform overview!
-
-Please note: It could need some fixes on exotic untested devices!
-```
+Ansible role to install and configure the Network Time Protocol (NTP) Daemon.
+This role was built with support for a variety of operating systems. Including Debian/Ubuntu, RHEL, Suse and Archlinux based Linux versions as well as FreeBSD, Darwin and OpenBSD.
## Role Variables
-This role has multiple variables. The defaults for all these variables are the following:
+In addition to the operating system-dependent variables, there are the following default values to adjust:
```yaml
---
@@ -32,14 +25,18 @@ ntp_restrict:
# Ntp server to use for date synchronization
# Default is worldwide pool
ntp_servers:
+ - ptbtime1.ptb.de
+ - ptbtime3.ptb.de
- 0.pool.ntp.org iburst
- 1.pool.ntp.org iburst
- 2.pool.ntp.org iburst
- 3.pool.ntp.org iburst
# Enable or disable ntp statistics
-# Default is false
ntp_statistics: false
+
+# version check for this playbook (true is recomended)
+submodules_versioncheck: false
```
## Resources
diff --git a/handlers/main.yml b/handlers/main.yml
index 48a9ca5..6875c44 100644
--- a/handlers/main.yml
+++ b/handlers/main.yml
@@ -1,18 +1,18 @@
---
- name: Restart ntp daemons on Linux
become: true
- service:
+ ansible.builtin.service:
name: "{{ ntp_service }}"
state: restarted
- name: Restart ntp daemons on FreeBSD
become: true
- service:
+ ansible.builtin.service:
name: "{{ ntp_service }}"
state: restarted
- name: Restart ntp daemons on OpenBSD
become: true
- service:
+ ansible.builtin.service:
name: "{{ ntp_service }}"
state: restarted
diff --git a/meta/main.yml b/meta/main.yml
index b2b8bfe..7bad56f 100644
--- a/meta/main.yml
+++ b/meta/main.yml
@@ -2,10 +2,10 @@
galaxy_info:
role_name: ntp
author: do1jlr
- description: Ansible role for manage ntp daemon
- license: "Apache"
+ description: install and configure the Network Time Protocol (NTP) Daemon
+ license: "Apache-2.0"
- min_ansible_version: 2.8
+ min_ansible_version: 2.11
platforms:
- name: Archlinux
diff --git a/tasks/main.yml b/tasks/main.yml
index e0c272e..0ccb762 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -8,5 +8,6 @@
- name: Install ntp
ansible.builtin.include_tasks: "{{ lookup('first_found', ntp__install) }}"
+
- name: Configure ntp
ansible.builtin.include_tasks: config.yml
diff --git a/tasks/versioncheck.yml b/tasks/versioncheck.yml
index dca3e47..5128cc8 100644
--- a/tasks/versioncheck.yml
+++ b/tasks/versioncheck.yml
@@ -1,4 +1,7 @@
---
+# Copyright (c) 2021 L3D
+# this file is released with the MIT license.
+# License: https://github.com/roles-ansible/ansible_role_template/blob/main/LICENSE
- name: Create directory for versionscheck
become: true
ansible.builtin.file:
@@ -32,11 +35,6 @@
when:
- playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck|bool
-- name: check if '/etc/ansible-version/' is empty
- ansible.builtin.find:
- paths: '/etc/ansible-version/'
- register: filesFound
-
- name: write new version to remote disk
become: true
ansible.builtin.copy:
diff --git a/vars/main.yml b/vars/main.yml
index 5d7fd77..e560b19 100644
--- a/vars/main.yml
+++ b/vars/main.yml
@@ -1,5 +1,5 @@
---
-playbook_version_number: 2051 # should be int
+playbook_version_number: 2053
playbook_version_path: 'role-ntp_chaos-bodensee_github.com.version'
ntp__vars: