# plugin deprecation and aliasing

**URL:** <https://forum.ansible.com/t/plugin-deprecation-and-aliasing/16625>\
**Category:** Ansible Developer\
**Created:** [October 28, 2014, 5:15pm UTC](https://forum.ansible.com/t/plugin-deprecation-and-aliasing/16625 "2014-10-28T17:15:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [October 28, 2014, 5:15pm UTC](https://forum.ansible.com/t/plugin-deprecation-and-aliasing/16625/1 "2014-10-28T17:15:24Z")

</div>

So I have a branch with an update to the plugin loader, this should now enable renaming and deprecating plugins.

[https://github.com/bcoca/ansible/tree/load\_aliases](https://github.com/bcoca/ansible/tree/load_aliases)

To deprecate a module just rename it with a leading underscore:

git mv stats.py \_stats.py

to rename a module, do:

git mv stats.py fileinfos.py  
ln -s fileinfos.py \_stats.py  
git add \_stats.py

This makes the ‘current’ module “fileinfos”, it also keeps “stats” as an alias to the new module name for backwards compatibility. Modules with a preceding underscore only get loaded if the name was unmatched to avoid collisions and confusion.

feedback encouraged!

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 30, 2014, 5:14pm UTC](https://forum.ansible.com/t/plugin-deprecation-and-aliasing/16625/2 "2014-10-30T17:14:12Z")

</div>

Thanks Brian!

As I mentioned on another thread (we, as in Brian) is working on making this capability show up on the docsite soon.

This will among other things allow better names for modules, like starting all the Google Cloud stuff with, say, gc, and the AWS stuff with aws, and openstack stuff with os\_

This will happen as soon as we get the doc site wired up and I’m super excited about it.

---

<div class="post-metadata">

**Author:** ![Monty\_Taylor](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@Monty\_Taylor](https://forum.ansible.com/u/Monty_Taylor)\
**Post date:** [October 30, 2014, 7:02pm UTC](https://forum.ansible.com/t/plugin-deprecation-and-aliasing/16625/3 "2014-10-30T19:02:47Z")

</div>

So. Exciting.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 30, 2014, 7:03pm UTC](https://forum.ansible.com/t/plugin-deprecation-and-aliasing/16625/4 "2014-10-30T19:03:55Z")

</div>

Another thing we just talked about is having subdirs, like

cloud/openstack/\*

we will definitely want them to be namespaced, like “os\_compute”, with aliases, but this will allow the individual doc lists to be categorized better too.

---

<div class="post-metadata">

**Author:** ![Monty\_Taylor](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@Monty\_Taylor](https://forum.ansible.com/u/Monty_Taylor)\
**Post date:** [October 30, 2014, 7:10pm UTC](https://forum.ansible.com/t/plugin-deprecation-and-aliasing/16625/5 "2014-10-30T19:10:03Z")

</div>

What about doing python-like modules - so that if there was:

cloud/openstack/compute.py

you could do:

- openstack.compute:

Or were you thinking still have:

cloud/openstack/os\_compute.py

and then have an alias of some sort? (happy to help hack on that feature if I know how you want it to look when it’s done)

Or were you thinking more like:

cloud/openstack/os\_compute.py

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 30, 2014, 7:11pm UTC](https://forum.ansible.com/t/plugin-deprecation-and-aliasing/16625/6 "2014-10-30T19:11:46Z")

</div>

Yeah, I’m not really wanting to require new namespacing rules at this time, as ‘compute’ would be otherwise ambiguous.

Thus I think it’s

cloud/openstack/os\_\*

In AWS we will have most things still starting with ec2 and some starting with just aws\_ with some aliases for their old forms.

Also in the modules lists will have icons beside core and deprecated modules in each subcategory.

---

<div class="post-metadata">

**Author:** ![Monty\_Taylor](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@Monty\_Taylor](https://forum.ansible.com/u/Monty_Taylor)\
**Post date:** [October 30, 2014, 7:14pm UTC](https://forum.ansible.com/t/plugin-deprecation-and-aliasing/16625/7 "2014-10-30T19:14:18Z")

</div>

Sweet.
