Skip to content

Commit

Permalink
Replace symlinks with meta/runtime.yml redirects. (#4562)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein authored Apr 26, 2022
1 parent 7ee38ea commit 7743ecd
Show file tree
Hide file tree
Showing 553 changed files with 1,109 additions and 559 deletions.
12 changes: 9 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,15 @@ Creating new modules and plugins requires a bit more work than other Pull Reques
- Make sure that new plugins and modules have tests (unit tests, integration tests, or both); it is preferable to have some tests
which run in CI.

4. For modules and action plugins, make sure to create your module/plugin in the correct subdirectory, and create a symbolic link
from `plugins/modules/` respectively `plugins/action/` to the actual module/plugin code. (Other plugin types should not use
subdirectories.)
4. For modules and action plugins, make sure to create your module/plugin in the correct subdirectory, and add a redirect entry
in `meta/runtime.yml`. For example, for the `aerospike_migrations` module located in
`plugins/modules/database/aerospike/aerospike_migrations.py`, you need to create the following entry:
```.yaml
aerospike_migrations:
redirect: community.general.database.aerospike.aerospike_migrations
```
Here, the relative path `database/aerospike/` is inserted into the module's FQCN (Fully Qualified Collection Name) after the
collection's name and before the module's name. This must not be done for other plugin types but modules and action plugins!

- Action plugins need to be accompanied by a module, even if the module file only contains documentation
(`DOCUMENTATION`, `EXAMPLES` and `RETURN`). The module must have the same name and directory path in `plugins/modules/`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ breaking_changes:
- git_config - remove Ansible 2.9 and early ansible-base 2.10 compatibility code (https://github.com/ansible-collections/community.general/pull/4548).
- java_keystore - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548).
- a_module test plugin - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548).
- The symbolic links used to implement flatmapping for all modules were removed and replaced by ``meta/runtime.yml`` redirects. This effectively breaks compatibility with Ansible 2.9 for all modules (without using their "long" names, which is discouraged and which can change without previous notice since they are considered an implementation detail) (https://github.com/ansible-collections/community.general/pull/4548).
Loading

0 comments on commit 7743ecd

Please sign in to comment.