From 58404698ef77bb5507fb1d5b3c6233bb0e174cda Mon Sep 17 00:00:00 2001 From: L3D Date: Sun, 26 Sep 2021 23:10:08 +0200 Subject: [PATCH 1/4] update versionscheck --- tasks/versioncheck.yml | 8 +++----- vars/main.yml | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) 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..afa23cf 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,5 +1,5 @@ --- -playbook_version_number: 2051 # should be int +playbook_version_number: 2052 playbook_version_path: 'role-ntp_chaos-bodensee_github.com.version' ntp__vars: From f6b0cc04302c66e3969d0d49ad15cbd05efb3bb5 Mon Sep 17 00:00:00 2001 From: L3D Date: Sun, 26 Sep 2021 23:17:54 +0200 Subject: [PATCH 2/4] update ansible to use FQCN at more places --- .github/galaxy.svg | 79 ++++++++++++++++ .github/license.svg | 217 ++++++++++++++++++++++++++++++++++++++++++++ handlers/main.yml | 6 +- meta/main.yml | 2 +- tasks/main.yml | 1 + vars/main.yml | 2 +- 6 files changed, 302 insertions(+), 5 deletions(-) create mode 100644 .github/galaxy.svg create mode 100644 .github/license.svg 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..4ab6d9a --- /dev/null +++ b/.github/license.svg @@ -0,0 +1,217 @@ + + + + + + image/svg+xml + + + + + + 3D <l3d@c3woc.de> + + + + + MIT License + + + + + + + + + + + + + + + + + + + + + + + + + + + MIT + MIT + + + license + license + + 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..3945ae7 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -5,7 +5,7 @@ galaxy_info: description: Ansible role for manage ntp daemon license: "Apache" - 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/vars/main.yml b/vars/main.yml index afa23cf..e560b19 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,5 +1,5 @@ --- -playbook_version_number: 2052 +playbook_version_number: 2053 playbook_version_path: 'role-ntp_chaos-bodensee_github.com.version' ntp__vars: From 63afd5cbcb52c498edd269414494b77c46108e66 Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 27 Sep 2021 00:14:59 +0200 Subject: [PATCH 3/4] update docs and METADATA --- .github/license.svg | 295 ++++++++++++-------------------------------- README.md | 25 ++-- meta/main.yml | 4 +- 3 files changed, 94 insertions(+), 230 deletions(-) diff --git a/.github/license.svg b/.github/license.svg index 4ab6d9a..67cfb13 100644 --- a/.github/license.svg +++ b/.github/license.svg @@ -1,217 +1,84 @@ - - - - - - image/svg+xml - - - - - - 3D <l3d@c3woc.de> - - - - - MIT License - - - - - - - - - - - - - - - - - - - - - - - - - - - MIT - MIT + + + + + image/svg+xml + + + + + 3D <l3d@c3woc.de> + + + + + MIT License + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - license - 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/meta/main.yml b/meta/main.yml index 3945ae7..7bad56f 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -2,8 +2,8 @@ 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.11 From 5fbbba8857aa52e93bd36218c0996b3f7b2cc735 Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 27 Sep 2021 00:15:43 +0200 Subject: [PATCH 4/4] Remove trailing whitespaces from LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.