diff options
Diffstat (limited to 'examples/.test_collection')
-rw-r--r-- | examples/.test_collection/.ansible-lint | 1 | ||||
-rw-r--r-- | examples/.test_collection/README.md | 3 | ||||
-rw-r--r-- | examples/.test_collection/galaxy.yml | 67 | ||||
-rw-r--r-- | examples/.test_collection/roles/my_role/tasks/main.yml | 13 | ||||
-rw-r--r-- | examples/.test_collection/roles/my_role2/tasks/main.yml | 4 |
5 files changed, 88 insertions, 0 deletions
diff --git a/examples/.test_collection/.ansible-lint b/examples/.test_collection/.ansible-lint new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/examples/.test_collection/.ansible-lint @@ -0,0 +1 @@ +{} diff --git a/examples/.test_collection/README.md b/examples/.test_collection/README.md new file mode 100644 index 0000000..b4aaea4 --- /dev/null +++ b/examples/.test_collection/README.md @@ -0,0 +1,3 @@ +# Ansible Collection - example.test_collection + +Documentation for the collection. diff --git a/examples/.test_collection/galaxy.yml b/examples/.test_collection/galaxy.yml new file mode 100644 index 0000000..633719b --- /dev/null +++ b/examples/.test_collection/galaxy.yml @@ -0,0 +1,67 @@ +--- +### 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: examples + +# The name of the collection. Has the same character restrictions as 'namespace' +name: test_collection + +# 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 <email> (url) +# @nicks:irc/im.site#channel' +authors: + - your name <example@domain.com> + +### 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: http://example.com/repository + +# 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: http://example.com/issue/tracker + +# 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. Mutually exclusive with 'manifest' +build_ignore: [] +# A dict controlling use of manifest directives used in building the collection artifact. The key 'directives' is a +# list of MANIFEST.in style +# L(directives,https://packaging.python.org/en/latest/guides/using-manifest-in/#manifest-in-commands). The key +# 'omit_default_directives' is a boolean that controls whether the default directives are used. Mutually exclusive +# with 'build_ignore' +# manifest: null diff --git a/examples/.test_collection/roles/my_role/tasks/main.yml b/examples/.test_collection/roles/my_role/tasks/main.yml new file mode 100644 index 0000000..784a814 --- /dev/null +++ b/examples/.test_collection/roles/my_role/tasks/main.yml @@ -0,0 +1,13 @@ +--- +- name: Task + ansible.builtin.include_role: + name: example.test_collection.my_role2 + vars: + my_role2_foo: something + +- name: Task 2 + # this task should NOT trigger var-naming[no-role-prefix] + vars: + foo: bar + ansible.builtin.debug: + msg: "{{ foo }}" diff --git a/examples/.test_collection/roles/my_role2/tasks/main.yml b/examples/.test_collection/roles/my_role2/tasks/main.yml new file mode 100644 index 0000000..27954a5 --- /dev/null +++ b/examples/.test_collection/roles/my_role2/tasks/main.yml @@ -0,0 +1,4 @@ +--- +- name: Task + ansible.builtin.debug: + msg: "{{ my_role2_foo }}" |