mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
template code fixes for 'make pep8'
This commit is contained in:
@@ -30,24 +30,26 @@ import datetime
|
|||||||
import pwd
|
import pwd
|
||||||
|
|
||||||
class Globals(object):
|
class Globals(object):
|
||||||
|
|
||||||
FILTERS = None
|
FILTERS = None
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def _get_filters():
|
def _get_filters():
|
||||||
''' return filter plugin instances '''
|
''' return filter plugin instances '''
|
||||||
|
|
||||||
if Globals.FILTERS is not None:
|
if Globals.FILTERS is not None:
|
||||||
return Globals.FILTERS
|
return Globals.FILTERS
|
||||||
|
|
||||||
from ansible import utils
|
from ansible import utils
|
||||||
plugins = [ x for x in utils.plugins.filter_loader.all()]
|
plugins = [ x for x in utils.plugins.filter_loader.all()]
|
||||||
filters = {}
|
filters = {}
|
||||||
for fp in plugins:
|
for fp in plugins:
|
||||||
filters.update(fp.filters())
|
filters.update(fp.filters())
|
||||||
Globals.FILTERS = filters
|
Globals.FILTERS = filters
|
||||||
|
|
||||||
return Globals.FILTERS
|
return Globals.FILTERS
|
||||||
|
|
||||||
def _get_extensions():
|
def _get_extensions():
|
||||||
''' return jinja2 extensions to load '''
|
''' return jinja2 extensions to load '''
|
||||||
|
|||||||
Reference in New Issue
Block a user