fix: Shortcut redirect.

master
Laur Ivan 2 years ago
parent 62c4a47e86
commit c0c2960e17
  1. 2
      galaxy.yml
  2. 10
      meta/runtime.yml
  3. 8
      plugins/filter/files.py

@ -9,7 +9,7 @@ namespace: laurivan
name: plugins
# The version of the collection. Must be compatible with semantic versioning
version: 1.0.1
version: 1.0.2
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md

@ -0,0 +1,10 @@
---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
requires_ansible: '>=2.9.6'
plugin_routing:
filter:
abspath:
redirect: laurivan.plugins.abspath

@ -1,9 +1,13 @@
from functools import partial
from ansible.utils.unicode import unicode_wrap
def abspath(fname):
return os.path.abspath(fname)
class FilterModule(object):
''' Ansible file jinja2 filters '''
def filters(self):
return {
'abspath': partial(unicode_wrap, os.path.abspath)
filters = {
'abspath': abspath
}
return filters

Loading…
Cancel
Save