From 6c3a0ee0be3ed308619660d415a54a1b77ae11df Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Mon, 29 Aug 2022 18:58:22 +0100 Subject: [PATCH] adding scaffolding of portainer colleciton --- .gitignore | 2 + chatton/portainer/README.md | 3 + chatton/portainer/galaxy.yml | 62 +++++++++++++++++++ chatton/portainer/plugins/README.md | 31 ++++++++++ .../plugins/modules/portainer_stack.py | 0 requirements.txt | 8 +++ 6 files changed, 106 insertions(+) create mode 100644 .gitignore create mode 100644 chatton/portainer/README.md create mode 100644 chatton/portainer/galaxy.yml create mode 100644 chatton/portainer/plugins/README.md create mode 100644 chatton/portainer/plugins/modules/portainer_stack.py create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e04276f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +venv diff --git a/chatton/portainer/README.md b/chatton/portainer/README.md new file mode 100644 index 0000000..c01ba4e --- /dev/null +++ b/chatton/portainer/README.md @@ -0,0 +1,3 @@ +# Ansible Collection - chatton.portainer + +Documentation for the collection. diff --git a/chatton/portainer/galaxy.yml b/chatton/portainer/galaxy.yml new file mode 100644 index 0000000..cb7fb85 --- /dev/null +++ b/chatton/portainer/galaxy.yml @@ -0,0 +1,62 @@ +### 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 lowercase characters and underscores. Namespaces cannot start with +# underscores or numbers and cannot contain consecutive underscores +namespace: chatton + +# The name of the collection. Has the same character restrictions as 'namespace' +name: portainer + +# The version of the collection. Must be compatible with semantic versioning +version: 1.0.0 + +# 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: +- Cian Hatton + + +### OPTIONAL but strongly recommended +# A short summary description of the collection +description: your collection description + +# 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: '' + +# 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: [] + +# 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 +repository: https://github.com/chatton/ansible-portainer + +# The URL to any online docs +documentation: http://docs.example.com + +# The URL to the homepage of the collection/project +homepage: http://example.com + +# The URL to the collection issue tracker +issues: https://github.com/chatton/ansible-portainer/issues + +# A list of file glob-like patterns used to filter any files or directories that should not be included in the build +# artifact. A pattern is matched from the relative path of the file or directory of the collection directory. This +# uses 'fnmatch' to match the files or directories. Some directories and files like 'galaxy.yml', '*.pyc', '*.retry', +# and '.git' are always filtered +build_ignore: [] + diff --git a/chatton/portainer/plugins/README.md b/chatton/portainer/plugins/README.md new file mode 100644 index 0000000..29aa319 --- /dev/null +++ b/chatton/portainer/plugins/README.md @@ -0,0 +1,31 @@ +# Collections Plugins Directory + +This directory can be used to ship various plugins inside an Ansible collection. Each plugin is placed in a folder that +is named after the type of plugin it is in. It can also include the `module_utils` and `modules` directory that +would contain module utils and modules respectively. + +Here is an example directory of the majority of plugins currently supported by Ansible: + +``` +└── plugins + ├── action + ├── become + ├── cache + ├── callback + ├── cliconf + ├── connection + ├── filter + ├── httpapi + ├── inventory + ├── lookup + ├── module_utils + ├── modules + ├── netconf + ├── shell + ├── strategy + ├── terminal + ├── test + └── vars +``` + +A full list of plugin types can be found at [Working With Plugins](https://docs.ansible.com/ansible-core/2.13/plugins/plugins.html). diff --git a/chatton/portainer/plugins/modules/portainer_stack.py b/chatton/portainer/plugins/modules/portainer_stack.py new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5de2f78 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,8 @@ +certifi==2022.6.15 +charset-normalizer==2.1.1 +click==8.1.3 +colorama==0.4.5 +idna==3.3 +portainer-py==0.7.6 +requests==2.28.1 +urllib3==1.26.12