You've already forked cookiecutter-ansible-role
Add basename filter
This commit is contained in:
@@ -10,5 +10,6 @@
|
||||
"azp_username": "{{ cookiecutter.author | lower | replace(' ', '') }}",
|
||||
"azp_branch": "main",
|
||||
"license": "Apache 2.0",
|
||||
"min_ansible_version": "2.9"
|
||||
"min_ansible_version": "2.9",
|
||||
"_extensions": ["local_extensions.basename"]
|
||||
}
|
||||
|
||||
10
local_extensions.py
Normal file
10
local_extensions.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import os
|
||||
from cookiecutter.utils import simple_filter
|
||||
|
||||
|
||||
@simple_filter
|
||||
def basename(path):
|
||||
return os.path.basename(path)
|
||||
@simple_filter
|
||||
def dirname(path):
|
||||
return os.path.dirname(path)
|
||||
Reference in New Issue
Block a user