Create your ansible collection from it
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

14 lines
341 B

#!/usr/bin/env python3
import re
import sys
ROLE_REGEX = r"^[_a-zA-Z][_a-zA-Z0-9]+$"
ANSIBLE_COLLECTION = "{{ cookiecutter.ansible_collection }}"
if not re.match(ROLE_REGEX, ANSIBLE_COLLECTION):
print(f"ERROR: '{ANSIBLE_COLLECTION}' is not a valid Python module name!")
# exits with status 1 to indicate failure
sys.exit(1)