From 59a1ba9462820ebdb9cc252b21fbb653ffe1fdb2 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Thu, 1 Feb 2024 23:29:35 -0800 Subject: [PATCH] update changelog and linting --- .github/workflows/release.yml | 7 ++--- CHANGELOG.rst | 27 +++++++++++++++++++ build/galaxy_deploy.yml | 18 ++++++++++--- build/templates/galaxy.yml.j2 | 50 +++++------------------------------ changelogs/.plugin-cache.yaml | 23 ++++++++++++++++ changelogs/changelog.yaml | 16 +++++++++++ changelogs/config.yaml | 32 +++++++++++----------- docs/readme.md | 33 ++++++++++++++--------- meta/runtime.yml | 1 + roles/docker/meta/main.yml | 2 +- 10 files changed, 128 insertions(+), 81 deletions(-) create mode 100644 CHANGELOG.rst create mode 100644 changelogs/.plugin-cache.yaml create mode 100644 changelogs/changelog.yaml create mode 100644 meta/runtime.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e18411c..e74cb2f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,10 +14,11 @@ jobs: - name: Check out code uses: actions/checkout@v1 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3.12 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 + - name: Install dependencies run: | diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 0000000..50a71be --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,27 @@ +=============================== +Ericsysmin.Docker Release Notes +=============================== + +.. contents:: Topics + + +v1.0.0 +====== + +Release Summary +--------------- + +1.0.0 release of the Docker role + +Major Changes +------------- + +- added recent versions of OS tests +- ensured existing role works with newer OS releases +- updated all tasks to meet newer ansible-lint requirements +- updated molecule testing + +New Roles +--------- + +- ericsysmin.docker.docker - Ansible role to deploy Docker CE or Docker EE diff --git a/build/galaxy_deploy.yml b/build/galaxy_deploy.yml index a5a0e4d..45a419b 100644 --- a/build/galaxy_deploy.yml +++ b/build/galaxy_deploy.yml @@ -1,5 +1,7 @@ --- -- hosts: localhost +# code: language=ansible +- name: Deploy the collection to Ansible Galaxy + hosts: localhost connection: local gather_facts: false vars: @@ -9,28 +11,36 @@ - name: Ensure the ANSIBLE_GALAXY_TOKEN environment variable is set. ansible.builtin.fail: msg: ANSIBLE_GALAXY_TOKEN is not set. - when: lookup('env','ANSIBLE_GALAXY_TOKEN') | length == 0 + when: lookup('env', 'ANSIBLE_GALAXY_TOKEN') | length == 0 + - name: Ensure the ~/.ansible directory exists. ansible.builtin.file: path: ~/.ansible state: directory + mode: "0755" + - name: Write the Galaxy token to ~/.ansible/galaxy_token ansible.builtin.copy: content: | token: {{ lookup('env', 'ANSIBLE_GALAXY_TOKEN') }} dest: ~/.ansible/galaxy_token + mode: "0644" + tasks: - name: Template out the galaxy.yml file. ansible.builtin.template: src: templates/galaxy.yml.j2 dest: ../galaxy.yml + mode: "0644" register: galaxy_yml - - name: Build the collection. # noqa 503 + + - name: Build the collection. # noqa no-changed-when no-handler ansible.builtin.command: > ansible-galaxy collection build chdir=../ when: galaxy_yml.changed - - name: Publish the collection. # noqa 503 + + - name: Publish the collection. # noqa no-changed-when no-handler ansible.builtin.command: > ansible-galaxy collection publish ./ericsysmin-docker-{{ tag }}.tar.gz chdir=../ diff --git a/build/templates/galaxy.yml.j2 b/build/templates/galaxy.yml.j2 index 516fa8d..1e438fa 100644 --- a/build/templates/galaxy.yml.j2 +++ b/build/templates/galaxy.yml.j2 @@ -1,58 +1,20 @@ -### REQUIRED - -# The namespace of the collection. This can be a company/brand/organization or product namespace under which all -# content lives. May only contain alphanumeric characters and underscores. Additionally namespaces cannot start with -# underscores or numbers and cannot contain consecutive underscores +--- +# code: language=ansible namespace: ericsysmin - -# The name of the collection. Has the same character restrictions as 'namespace' name: docker - -# The version of the collection. Must be compatible with semantic versioning version: "{{ tag }}" - -# The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md - -# A list of the collection's content authors. Can be just the name or in the format 'Full Name (url) -# @nicks:irc/im.site#channel' authors: - Eric Anderson - - -### OPTIONAL but strongly recommended - -# A short summary description of the collection description: Docker collection - -# Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only -# accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file' -# license: -# - GPL-2.0-or-later - -# The path to the license file for the collection. This path is relative to the root of the collection. This key is -# mutually exclusive with 'license' license_file: LICENSE - -# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character -# requirements as 'namespace' and 'name' tags: - docker - -# Collections that this collection requires to be installed for it to be usable. The key of the dict is the -# collection label 'namespace.name'. The value is a version range -# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version -# range specifiers can be set and are separated by ',' -#dependencies: {} - -# The URL of the originating SCM repository +dependencies: { + "community.general": "*", + "ansible.posix": "*" +} repository: https://github.com/ericsysmin/ansible-collection-docker - -# The URL to any online docs #documentation: http://docs.example.com - -# The URL to the homepage of the collection/project homepage: https://github.com/ericsysmin/ansible-collection-docker - -# The URL to the collection issue tracker issues: https://github.com/ericsysmin/ansible-collection-docker/issues diff --git a/changelogs/.plugin-cache.yaml b/changelogs/.plugin-cache.yaml new file mode 100644 index 0000000..cfa515e --- /dev/null +++ b/changelogs/.plugin-cache.yaml @@ -0,0 +1,23 @@ +objects: + role: + docker: + description: Ansible role to install and configure Docker + name: docker + version_added: null +plugins: + become: {} + cache: {} + callback: {} + cliconf: {} + connection: {} + filter: {} + httpapi: {} + inventory: {} + lookup: {} + module: {} + netconf: {} + shell: {} + strategy: {} + test: {} + vars: {} +version: 1.0.0 diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml new file mode 100644 index 0000000..eb7afe3 --- /dev/null +++ b/changelogs/changelog.yaml @@ -0,0 +1,16 @@ +ancestor: null +releases: + 1.0.0: + release_date: '2024-02-01' + changes: + release_summary: 1.0.0 release of the Docker role + major_changes: + - added recent versions of OS tests + - ensured existing role works with newer OS releases + - updated all tasks to meet newer ansible-lint requirements + - updated molecule testing + objects: + role: + - name: docker + description: Ansible role to deploy Docker CE or Docker EE + namespace: null diff --git a/changelogs/config.yaml b/changelogs/config.yaml index a053f29..24ff439 100644 --- a/changelogs/config.yaml +++ b/changelogs/config.yaml @@ -11,22 +11,22 @@ prelude_section_name: release_summary prelude_section_title: Release Summary sanitize_changelog: true sections: -- - major_changes - - Major Changes -- - minor_changes - - Minor Changes -- - breaking_changes - - Breaking Changes / Porting Guide -- - deprecated_features - - Deprecated Features -- - removed_features - - Removed Features (previously deprecated) -- - security_fixes - - Security Fixes -- - bugfixes - - Bugfixes -- - known_issues - - Known Issues + - - major_changes + - Major Changes + - - minor_changes + - Minor Changes + - - breaking_changes + - Breaking Changes / Porting Guide + - - deprecated_features + - Deprecated Features + - - removed_features + - Removed Features (previously deprecated) + - - security_fixes + - Security Fixes + - - bugfixes + - Bugfixes + - - known_issues + - Known Issues title: Ericsysmin.Docker trivial_section_name: trivial use_fqcn: true diff --git a/docs/readme.md b/docs/readme.md index 367b977..eb7c715 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -1,14 +1,17 @@ -## Installing Docker via Ansible -### Default Docker Install -``` +# Installing Docker via Ansible + +## Default Docker Install + +```yaml --- - hosts: all roles: - role: avinetworks.docker ``` -### Install Docker w/devicemapper -``` +## Install Docker w/devicemapper + +```yaml --- - hosts: all roles: @@ -17,8 +20,9 @@ docker_block_device: /dev/sda3 ``` -### Install Docker w/HTTP Proxy Support -``` +## Install Docker w/HTTP Proxy Support + +```yaml --- - hosts: all roles: @@ -27,8 +31,9 @@ docker_https_proxy: https://proxy.example.com:443/ ``` -### Install Docker w/HTTP Proxy Support & without proxy on internal sites -``` +## Install Docker w/HTTP Proxy Support & without proxy on internal sites + +```yaml --- - hosts: all roles: @@ -38,8 +43,9 @@ docker_no_proxy_params: "localhost,127.0.0.0/8,docker-registry.example.com" ``` -### Install Docker and customize the storage directory of images and containers -``` +## Install Docker and customize the storage directory of images and containers + +```yaml --- - hosts: all roles: @@ -47,8 +53,9 @@ docker_graph: /home/docker ``` -### Install/Upgrade Docker. Avoid container downtime during the upgrade of a Docker -``` +## Install/Upgrade Docker. Avoid container downtime during the upgrade of a Docker + +```yaml --- - hosts: all roles: diff --git a/meta/runtime.yml b/meta/runtime.yml new file mode 100644 index 0000000..bb3fca1 --- /dev/null +++ b/meta/runtime.yml @@ -0,0 +1 @@ +requires_ansible: '>=2.14.0' diff --git a/roles/docker/meta/main.yml b/roles/docker/meta/main.yml index 42fb2ba..a7bccaf 100644 --- a/roles/docker/meta/main.yml +++ b/roles/docker/meta/main.yml @@ -3,7 +3,7 @@ galaxy_info: role_name: docker author: ericsymsin - description: Ansible role that installs Docker + description: Ansible role that installs and configures Docker issue_tracker_url: https://github.com/ericsysmin/ansible-collection-docker/issues license: MIT min_ansible_version: "2.9.0"