From 0559b6976df4d7df32826591c89d516e14b25245 Mon Sep 17 00:00:00 2001 From: L3D Date: Tue, 28 Nov 2023 01:13:08 +0100 Subject: [PATCH] Adding version, ntp role and README --- .gitmodules | 3 ++ README.md | 71 ++++++++++++++++++++++++++++++++++++++++++++++-- requirements.yml | 4 +++ roles/ntp | 1 + 4 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 .gitmodules create mode 100644 requirements.yml create mode 160000 roles/ntp diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..69e2d25 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "roles/ntp"] + path = roles/ntp + url = https://github.com/roles-ansible/ansible_role_ntp.git diff --git a/README.md b/README.md index adbb9af..a4f1101 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,69 @@ -# ansible_collection_time -Ansible Collection l3d.time +[![collection l3d.time](https://ansible.l3d.space/svg/l3d.time_ansible-collection_collection.svg)](https://galaxy.ansible.com/ui/repo/published/l3d.time/) +[![Maintainance](https://ansible.l3d.space/svg/l3d.time_maintainance_collection.svg)](https://ansible.l3d.space/#l3d.time) +[![License](https://ansible.l3d.space/svg/l3d.time_license_collection.svg)](LICENSE) + + Ansible Collection - l3d.time +============================ + +This is the Ansible Collection ``l3d.time``. A collection for our time manupulating ansible roles. +Here are all our ansible roles for installing git server. + +## Ansible Roles in l3d.time +- [![l3d.time.ntp](https://ansible.l3d.space/svg/l3d.time.ntp_ansible-role.svg)](https://github.com/roles-ansible/ansible_role_ntp.git) - Ansible role to install and configure the Network Time Protocol (NTP) Daemon. + +## Using this Collection +You can install the collection using ansible-galaxy by running: +```bash +ansible-galaxy collection install l3d.time:1.0.0 +``` + +Remember you can to Upgrade to the latest version of the l3d.time collection using the ``--upgrade`` parameter: +```bash +ansible-galaxy collection install l3d.time --upgrade +``` + + +Or you could clone this collection in your local ansible project for example to ``collections/ansible_collections/l3d.time/``. Make sure you checkout [git submodules](https://git-scm.com/docs/git-submodule) too. Example: +``` +# Clone git Repo with submodules to specified path +git clone --recursive https://github.com/roles-ansible/ansible_collection_time.git collections/ansible_collections/l3d/time/ + +# change directory +cd collections/ansible_collections/l3d.time/ + +# optionally init git submodules +git submodule update --init --recursive + +# optionally install all requirements +ansible-galaxy collection install -r requirements.yml --upgrade +``` + +You can also list a collection in ``requirements.yml``: +```yaml +--- +collections: + - name: l3d.time + version: ">=1.0.0" +``` + +## Include roles in your playbook +Example Playbook using the l3d.time.ntp role: +```yaml +--- +- name: "Install NTP Server from collection l3d.time" + hosts: ntp.example.com + roles: + - {role: l3d.time.ntp, tags: ntp} + vars: + ntp_set_time_zone: true + ntp_timezone: Zulu +``` + +## Requirements +The roles in this collection using the ``community.general`` ansible Collections. + +### Example Requirements Installation: +```bash +# galaxy requirements +ansible-galaxy install -r requirements.yml --upgrade +``` diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 0000000..ba1697c --- /dev/null +++ b/requirements.yml @@ -0,0 +1,4 @@ +--- +collections: + - name: community.general + version: ">=8.0.2" diff --git a/roles/ntp b/roles/ntp new file mode 160000 index 0000000..a3ac34e --- /dev/null +++ b/roles/ntp @@ -0,0 +1 @@ +Subproject commit a3ac34e33dda8a0d5633ee8bb111aea6ddf62a90